> Also, how do you solve homelessness?
That's the problem: there are many completely different situations that lead someone to become homeless, and the solutions must be tailored to the specific case you are targeting. (it's a variant of the Anna Karenina principle: “All happy families are alike; each unhappy family is unhappy in its own way.”)
And you also need to take into account the role of homelessness as a coercive force in modern societies: it the treat that keeps worker behave at work, prevent unhappy women from leaving their husband, and make sure tenants pay their rent to their landlord and make sure people repay their mortgage before any other expense. Remove it suddenly and then you'll probably end up needing way more housing than what you planned for previously homeless people. And it would absolutely tank the real estate market.
I'm convinced that all of the above would be a good thing for society, but the shock would be absolutely gigantic. It's not just about investing a few billions of dollar, the cost of the housing per se would be negligible in the earthquake that it would cause.