Afford to live in the community is significantly more important but In general I think it is better if they can do both. However home's are assets & assets can have bubbles. I don't think the public should necessarily be paying wages such that someone can buy a home at any cost.
I can't afford to purchase these radically inflated assets myself... but if you want to call me scrooge because I don't think owning a multi-million dollar house is a fundamental human right, go ahead.
But I can still simultaneously believe teachers are underpaid and at the same think they aren't entitled to multi-million dollar homes.
[1] https://www.openthebooks.com/forbes-why-san-francisco-is-in-...
[2] https://www.salary.com/research/salary/benchmark/public-scho...
If the argument is that teacher salaries should be a linear function of average home values and that a $1M/yr salary doesn't make sense and a $3.8k/yr salary doesn't either, I'm not sure where you want to go from there.
1. https://www.credible.com/blog/data-insights/county-in-every-...
It’s not necessarily normal to live in a house. It certainly shouldn’t be normal in cities.
If public housing is more attractive than private then property price problem solves itself.
What you can know is that in expensive areas, they will need to pay a premium, but does the premium need to be as high to allow teachers to buy houses there instead of commuting in? And if you did pay them that much, many would prefer to keep the money and commute a bit longer because they may not value housing as much as the people living in the community. So people have different values and we should let them make their own trade offs. If a community can't hire enough teachers because cost of living is high, then they will need to raise wages. Once they can hire enough, then let people chose for themselves where they want to work and live.