There's an easy way to do that - raise teachers' salaries, and let them choose whatever housing they want, not what you've arbitrarily designated as "affordable" (via a political process). This raises observable costs, but has plenty of less obviohs benefits.