It's mostly an socioeconomic problem, at least for US public education. People don't want to pay for other people's kids.
We spend an ungodly amount of money on education. The one problem the public schools don’t have is a lack of money. The budget for the public school system in my midwestern city of 750,000 people is larger than the city’s entire budget.
Third world countries get better educational outcomes with literally 5% of the money we spend on education. It can be done, quite easily, in fact.
This is not a socioeconomic problem. It is an incentive problem. No one is ever held accountable for educational outcomes in public school systems. Tie teacher and administrator compensation to educational outcomes and this problem will disappear in a semester.