Some housing has been built directly for lower-income people, but liberals have waged political warfare against that kind of housing for more than a century, except where the government builds it as housing projects. At one time the object of the reformers' wrath was the tenement. Today, it is the mobile home, which has been banned from community after community by zoning ordinances.
In short, the kind of people who are crying out for more "affordable housing" have played a major role in banning affordable housing when it emerged in the marketplace. They have also restricted the building of new housing that would free up some of the existing housing to become affordable, after its occupants have moved out into the new housing.
Housing circulates among people as people circulate among housing. But housing shortages and rent control tend to freeze people where they are. It is common in rent-controlled housing for tenants to stay in the same apartment long after their children have grown up and left one or two elderly people occupying far more space than they would occupy if they had to pay the full cost in a free market.
A study in New York City found 175,000 apartments where one person occupied four or more rooms -- mostly elderly people in rent-controlled apartments. A recent study in San Francisco found that nearly half the rent-controlled apartments contained only one person and more than three quarters of all rent-controlled apartments had no children.
What is "the solution"? The solution is to stop doing the things that create the problem. But politicians, especially on the left, always like to "do something" -- whether that something makes things better or worse.