I grew up in a family of five children, and an important rule of the nursery was “Nobody gets seconds until everyone has had firsts.” This seems to me to be an excellent rule to apply to all necessities, especially to that necessity that is fundamental to any kind of dignified life, housing. It is not as if you can just go out and build a house for yourself and live in it; the authorities will come and bulldoze it (and then send you a bill for the work!). If you deny someone the fundamental right to fend for him or herself (or to band together as a group to do so), then you have an obligation to provide those necessities that you have denied them, not as charity, but as a right.
So how would we apply these principles to housing? We could perhaps pass a law that nobody could own a second house until everyone had a house to live in, but such a law would be very difficult to enforce, and cause much chaos in the housing markets. I would suggest there is a better way. In its simplest form, it goes like this. First, calculate the total cost of fully housing everyone. Second, calculate the total assessed value of all secondary housing in the country. Secondary housing is any housing that is not somebody’s primary residence. It includes second homes, empty houses, and vacation rentals. Third, calculate the percentage of assessed valuation that will meet the housing costs and impose an annual federal property tax at that percentage rate.
No doubt an actual implementation would have to be somewhat more complex, but it seems to me eminently fair that the owners of secondary housing should bear the cost of housing the homeless. If there were no such concept as secondary housing, and all housing was available for occupancy, we would be able to house everyone with no difficulty. Indeed, if we simply counted the empty houses there are enough to house all of the homeless eight times over. What prevents people from living in houses is not the unavailability of houses, or even the actual costs of housing them, but rather the price of housing. This is determined by the market as a whole; if more income can be derived from houses by turning them into short term vacation rentals, there will be fewer primary housing units available, and therefore the price will rise. The same argument applies to all kinds of secondary housing. Therefore the exorbitant price of primary housing is a direct result of the existence of the secondary housing market, so it is only fair that that those who benefit from that market (either financially or by being able to enjoy multiple homes) should pay for those who are priced out of the market altogether by these activities.