If every developer was able to build as much housing as they ever wanted, the quality would go up through competition.
In pretty much every other sector of the economy, the government regulates safety, and quality comes via competition. Housing should be no different.
But because we've artificially throttled the amount of housing that can be built, the best way to improve profits is to push down the quality as the buyers don't really have an alternative
I'm not an economist but my armchair opinion thinks you're wrong about quality going up; competition is about driving pricing down and undercutting others, cutting corners as much as possible.
Take Amazon or the Chinese webshops, they've flooded the market with products that do the same thing but cheaper, but whose quality is way lower.
Take the acquisitions of e.g. power tool brands by investors, who then use the brand's brand awareness and quality inertia to cut costs and boost their profit margin.
Take hotels, which used to feel luxurious but which have over time been redesigned to require minimal maintenance and personnel.
The only competitive market where they try to one-up each other on quality is aimed at the rich where money is not an issue. The middle ground is disappearing.
I would expect the competition to work the same way it does in laptops, cars or food: producing everything from cheapest-still-legal options to outright luxury. We have this sort of choice in most sectors of the economy.
BTW A mediocre apartment in your name is still an apartment. I grew up in one, but in our then-relatively-precarious family situation, the fact that we weren't renting and no one could just throw us out made a lot of other problems and crises way, way more bearable. Even though the bathroom was subpar and the kitchen horribly old.
We shouldn't be dismissive of lower quality products if they still can provide value to their owners.
The problem is housing, in general, is a an inelastic good - we can't just apply free market thinking to it, it doesn't work. For a few reasons:
1. It takes a really long time to develop housing in a meaningful way, like on the order of decades to build communities.
2. People don't actually really choose where to live, it's a lot like hospitals. You live where your job is, which means the more economically strong a place is (city) the more housing you need. Which is why cities are dense. It might sound obvious, but it's not like choosing which brand of cereal to buy.
Competition would have that effect… in a perfect market, which is a theoretical construct. Especially in context of urbanism, building an abomination can hurt the entire community and takes space from proper construction.
In pretty much every other sector of the economy, the government regulates safety, and quality comes via competition. Housing should be no different.
But because we've artificially throttled the amount of housing that can be built, the best way to improve profits is to push down the quality as the buyers don't really have an alternative