For the most part free societies don't dictate directly but shape with the carrot and the stick.
Homelessness is not a problem home owners should solve. It's absurd to think the solution is simply moving homeless people into unoccupied homes. We should address the root societal, economic and often personal causes of homelessness to begin with: lack of jobs, low income / unaffordable housing, mental health, etc.
What you're proposing is limiting prosperity for successful people, while allowing scammers like squatters to prosper instead. Why should I work to own a home if I can just take over someone else's?
Wealth inequality is a problem, but this is not the way to fix it.
Not allowing people to own two homes would mean that all rich people can't buy and drive up the cost of property.
And no it's not a fix to wealth inequality. It's a way to help try and solve a common problem
Well yes, in a perfect world, unfortunately trying to eradicate inequality with laws alone historically has had disastrous outcomes.