If rich people move into the cities, and form little neighborhood clusters to exclude poor families, the schools will become more attractive by all standard measures.
Now, the trick is that it's much easier to build out segregated wealthy communities in the suburbs, than it is in cities, since tight geography works against the informal segregation of suburban development projects.
My sister just moved to Wyoming and has a daughter in school there. They live a few blocks from a school, but she's not able to attend that school because it's in high demand. Apparently parents are able to apply to go to any (public) school in the district, and are accepted based on a lottery with no preference given to proximity to the school. (I could be wrong about these details, this is just what she told me.)
I guess that system is designed in part to account for the effect you're describing - if one school starts to become known as a better school, the kids in the poor parts of town are just as likely to be able to get in as anyone else. I have no idea if it actually works that way, but I do know it's a pain for my sister who now has to drive her kids to school several miles away when they could easily walk to the closer one. Can't please everyone, I guess.
Be careful there at teasing out the real motivation. If you want "wealthy students" because poor people are icky, then you're a jerk. If you want "wealthy students" because you want schools to be well-funded, that means you do in fact want good schools.
How to tell the difference? Maybe by putting the person somewhere where all schools in a very large area are funded at the exact same level. I don't know. But assuming it's a dog whistle isn't a good idea.
Yes, we do have a measurement problem. I was going to propose a solution, but it's a hard problem and any solution will necessarily have side effects on the surrounding communities as well.
Or better yet, say something constructive.