But then, lots of people think they know what to do to fix housing: Stick it to the landlord with rent controls. Require developers to set aside low-cost units. Build more subsidized housing. Distribute more rent vouchers or, as San Francisco has recently done, funnel taxes and fees into a housing trust fund. For those with more faith in market forces, there is always the loosening of zoning regulations, in imitation of sprawling Houston — which is indisputably cheap, so long as you don’t factor in the cost of driving.

Yet many of these solutions are dwarfed by the sheer size of the problem. London alone needs, by one count, 800,000 new units by 2021 to meet both pent-up and new demand. Sydney, where the median rent on a two-bedroom apartment is now $2,600 a month, aspires to build more than half a million units by 2031, a goal for which it would have to double its normal pace of construction. New York needs more than 300,000 units by 2030. By contrast, inclusionary zoning, a celebrated policy solution that requires developers to set aside units for working and low-income families, has created a measly 2,800 affordable apartments in New York since 2005. It’s not clear we have the fortitude to deal with these shortages head-on.

And housing policy can be very tricky to get right. “Success is going to be in the eye of the beholder,” says Eric Belsky, the managing director of the Joint Center for Housing Studies at Harvard. “If success means building more homes at greater densities, you’ll end up with some neighbors not happy, and if you target everything at low incomes, the middle class will feel left out.”

There are other complications as well, Belsky says. Economic forces relentlessly push back against the best intentions of political leaders. Let’s say you take a crummy neighborhood, and you build a really nice affordable housing complex in the middle of it. You’ve just made everything around the complex more desirable, and thus more expensive. You’ve lowered some people’s rent, but raised everybody else’s (perhaps even making the waiting list to get into the new complex even longer). Or let’s say you want poor people to be able to live in mixed-income neighborhoods, so you subsidize their rent. If there are too many vouchers and not enough apartments, Belsky says, you have just raised everybody’s rent again.

It seems the only solution would be to level all of, say, North Brooklyn and put up monolithic prefab tower blocks. But New Yorkers don’t want to live in Singapore. They want historic brownstones, landmark warehouses and waterfront views. The difficulty of deciding where and what to build means that cities with a shortfall of hundreds of thousands of apartments often have only the vaguest plans for how to meet the deficit.

“It’s not that it would be physically impossible,” says Ed Glaeser, a Harvard economist who has studied housing and deregulation. “After all, the construction industry would love such a challenge. But it’s politically totally impossible.” Glaeser says cities approve lovely things like landmark districts and sidewalk setbacks without doing any cost-benefit analysis of their effect on housing supply. “One of my pet peeves is that environmental reviews are only focused on the local environmental impact of building the project, but not the global environmental impact of not building the project.”

But unshackling the private sector may not be a complete solution, either. Many housing advocates, even conservative ones, insist that the free market will never provide housing that low-income families can afford, because apartments are simply too expensive to build nowadays. Some form of subsidy is needed, they say. But the size of a subsidy that actually covered the demand would be immense. The Bipartisan Policy Center in Washington figured out that giving all low-income families vouchers large enough to make their rents affordable would require federal rent supports, now at $62 billion a year, to more than double.

Of course, rents don’t always go up. Even San Francisco’s rents fell off a cliff after the dot-com bust last decade. But increasingly, there are economic forces at work that seem to move in only one direction: More people are moving to cities, and wealth is distributed more unequally. Apartments have become a global commodity, a safe investment for the well heeled, no matter where they actually live. Todd Sinai, a Wharton economist, says that just as cities have always had fashionable neighborhoods where only wealthy people can afford to live, now some “superstar cities” have become just like those places, the affluent districts of the globe. When housing is worth so much on the open market, it becomes harder to hold some of it back for regular workers. And eventually, Sinai says, the rich could find themselves displaced as well — by those who are even richer.