As long as property taxes are the basis for funding schools, the disparity is going to continue. 

For example, if a school is staffed with a ratio of 25:1, it sounds great. Offer a low enrollment class like AP Chemistry which might draw 20 students. The other 5 students have to be somewhere. repeat this for other classes and the 25:1 becomes 28 or 29:1 While that doesn't sound like much, any teacher can tell you that it changes the dynamics of the classroom greatly. This means that administrators not only have to find and keep a teacher capable of teaching a college level chemistry class, they also have to handle ever increasing class ratios. Of course, they could hire more teachers and keep ratios down,. but that costs money that is not available.