The way I see it, the cause of the housing bubble was the excess credit then, which increased only the demand for houses. To get a matching increase of offer, the prices had to go up. That alone generates inflation, and when the credit dried, prices dropped back to normal, and people got stuck with the debt.
One way to avoid that is for the government to work on both ends of the market, both demand and offer. The president can lower building taxes, outright subsidize building, or the government can just build houses, though I don't see that last one happening in USA.
When the credit dries, taxes go back up and prices stay the same.
The same goes for education, if there is too much credit for the population floating around, there should be more funding for public schools and universities.
It is possible to counter these market movements that generate bubbles. When they happen on such a large scale, they are easy to spot too.