The quality of the match between students and schools affects learning, but little is known about the magnitude of these effects or how they respond to changes in market structure. I develop a quantitative equilibrium model of school competition with horizontal competition in match quality. I estimate the model using data from Pakistan, a country with high private enrollment, and (1) quantify the importance of good matches, (2) show that profit-maximizing private schools' choices of quality advantage wealthier students, increasing inequality and reducing welfare and learning, and (3) provide intuition for when interventions in the market are valuable.