Capital that could be invested in better serving the bottom half has to compete not only with the use of those resources to further enrich the rich but other investment opportunities.
Think about it this way: assume you supply all the housing to all the rich people. Then there still remains untapped demand of others that can be fulfilled by further production of homes for those specific people.
This story fails when land becomes restricted, which is exactly what zoning laws cause. Zoning is a big harm to the poor.
This disregards basic geometry. Sure, in some rare situations you only have one small plot of land surrounded by existing construction or natural boundaries. But, in the majority of cases, you have one large plot of land, and you can either construct one big house on it, 5 smaller houses, 10 small houses, or 200 apartments in a block. The rich are absolutely competing for this lot with the poor.
And as inequality goes up, the rich can even start contemplating buying up surrounding properties, tearing down construction, and transforming a small plot into a much larger one.
As with everything the regulator needs to strike a balance to make the market work.
The reality of zoning laws in Western countries is to provide a target for regulatory capture by the NIMBY crowd. With the result that we're systemically underbuilding housing, then wonder why we wound up with homelessness.
> ... and even investment properties occupied by nobody ...
Not much of an investment. Something is wrong if that is happening, probably manifesting as a lack of supply. Otherwise what is the point of an "asset" that doesn't generate income, degrades over time and could easily be rented out at a profit rather than sitting unused?
Whatever scenario there is where it makes sense to have an empty property, assuming a sane policy backdrop, it'd always be better for the owner do what they were going to do anyway but also rent it out.
Short term rentals are better on that score: no one sensible forms a long-term expectation that they're going to live in an Airbnb that they've rented for a few days. (If you think short-term rentals are "bad" for the long-term market or have negative side-effects on the neighborhood, then tax them to manage that tradeoff. But banning them altogether is unconscionable and just leads to houses sitting empty and unused.)
As for larger homes, people should be allowed to live in there as larger, extended family groups - a common pattern in non-Anglo cultures. Ban "single family" restrictions since they amount to unconscionable discrimination against such reasonable living arrangements.