Markets clearly haven't solved the problem. They've certainly had the time.
"This enormously regulated industry doesn't yield outcomes we like for the poor! Obviously markets cannot solve this problem!" is a disturbingly common argument.
See San Francisco as an example of what happens when more money is poured in the "modern" solutions - very little reduction of the problem, if any.
So yes, markets failed to provide very cheap housing and not for lack of cheap land or costs of construction. It's just because they provide even worse profit margins. Deregulating the industry won't help with that.