San Francisco has better placement than 99,9% of Earth.
Most of places on Earth has snow, heat waves, no coasts, biting insects, or a combination of that. They are also not located in the richest country, in a place which historically produces jobs.
So, under this regime specifically San Francisco will get population influx until it is not usable for absolute majority of people (think a bro dormitory the size of SF), and that process will be repeated for many other lucrative locations on Earth (heck, many cities are arguably already going that route).
I don't see how free housing differs from sacrificing every place you like to tragedy of the commons on grand scale, until there is nothing for you to like there anymore and you move on yourself.
Other than that, there are places on Earth with basically free housing. Check out Vorkuta.
Most places can do this. The US can do it. Everything contrary is just excuses.