"viciously difficult problem to solve"
It is very easy in fact: abolish public-private partnerships, they have been an abhorrent failure from the Smedley Butlers of the world [1] to the Norfolk Southerns of recent news.
You want to have "a company in the free market", very well, do it, no state funds, no grants, "hustle", be innovative well within the regulations, whatever.
You want to have a state, very well, do it, be interested in educating people as soon as they can talk, take care of the basic needs for all people (food, shelter, safety, healthcare, meaningfulness), make the state interface an absolute pleasure, perhaps develop even some status games, reward people for following the laws, for developing a community (invert the reinforcement curve, less punishments, more rewards), and so forth.
What we have today is simply a criminal joke: some nameless suits (random pick, who is the COO of CVS Health? [2]) meet in various glass buildings and print trillions for their own benefit. No society will be able to withstand this kind of sociopathic behaviour for more than a few centuries, vide Senatus Populusque Romanus [3], not like that's any consolation for us living today.
[1] "I feel I might have given Al Capone a few hints. The best he could do was to operate his racket in three city districts. We Marines operated on three continents." https://en.wikiquote.org/wiki/Smedley_Butler#:~:text=I%20fee....
[2] CVS Health is the 4th company in US by Fortune 500 in 2022; Jonathan C. Roberts was the COO until 2022 apparently, now there is no COO, https://drugstorenews.com/cvs-health-coo-jonathan-roberts-re...
[3] An example would be the story of Marcus Licinius Crassus, https://en.wikipedia.org/wiki/Marcus_Licinius_Crassus#Rise_t..., Crassus became wealthy, "the richest man in Rome", from real estate, among others: he would buy burned houses for nothing and use slave labor to rebuild; he also had his own fire brigade, the first ever in Rome: the firefighters would start fighting the fire only after Crassus finished the 'negotiation' with the owner for the price of the burning house.