There are plenty of capitalist nations providing favorable conditions to people having children, most of them in Europe. It doesn't work because people don't have a dozen children if they don't need them as a retirement plan.
The problem behind homelessness in Finland, a nation that actually wants to do something about it, is the same as the problem behind retirement ages rising across Europe, etc. You're talking about a nation that taxes the wealthy quite dearly. But if there aren't enough workers, you have to pay the ones that do exist too much. A planned economy shuffles things around, but it doesn't make these workers appear out of thin air.
No economic system fixes the fact that with every passing year, there are more people whose upkeep needs to be provided by yet fewer people. Not until most necessary jobs can truly be automated away, but the way things are going, nobody wants that anyway.