Families are "socialist". Investing in each other and their young.
Wealthy families are even more "socialist". Dramatically so. Investing in offspring through childhood, higher education, and often long after.
For good reason. Education and health have a compounding impact on people's potentials, for themselves and as a benefit to others.
Key word here is: Compounding
That being said, all investments must be prioritized against a total balance sheet. Debt also compounds. And Kerala demonstrates health and education are a matter of prioritization of efforts, even more so than money.
EDIT: Not promoting actual Socialism. Which has been demonstrated to be catastrophically unstable, quickly transforming into an authoritarianism of elites, inevitably economically propped up by a "free market", either ad hoc, underground or as a "dual" system. Critiquing a particular brand of "anti-socialism" in the U.S. that can best be described as anti-national investment in people, without consideration for specifics or benefits, and often agnostic on corporate subsidies.
No matter what their politics most people will look out for their family especially their kids.
Added edit to clarify.