That still works up to like age 7. It really is needed for that age up to ~18, which means you can get with providing that service for ~15 years (multiple children) and then going back to smaller apartments.
Or you can keep the smaller apartments and make boarding schools more common. Small kids all live in the same room while the ones old enough to need their own space move out completely to a boarding school. Depending on the specifics, may be a much better solution overall.
I actually attended high school in that way in Poland, despite it being very rare here. I was 15 when I started. While I think it was great for me, I would not recommend doing it for younger people - you need some basic emotional maturity and safety.
Even then, it would not solve any problems here, really.
It is not about preference, but because of regulation. Nowadays the government demand is that each child needs to have a separate studying and sleeping area. If a sliding wall in a room counts as a separate area is up to the officials' discretion.
On one hand, all of this is understandable, but on the other hand these policies do indeed raise the cost of having children.
"Just stop preferring that"? Good luck enforcing that.