Firstly, by not having extreme poverty. You can't solve at school the problems that exist at home. We have adequate housing and benefits systems, and a minimum wage that people can actually live on. In addition, we have local intervention teams (and budgets) that try to fix problems that children encounter in their home situations (such as violence, substance abuse, etc).
Secondly, by banning private schools: all schools are funded directly by the government based on number of pupils. This makes sure that the rich don't withdraw their children from society, and thus makes sure they have a stake in public education.
Thirdly, by investing heavily in teachers' education. Many teachers here have two degrees: one in their teaching subject, and one in pedagogy or psychology.
That said, I've heard many people say that our education system isn't what it used to be either, mainly because of two changes:
- a decade or so ago the government closed all special-needs schools (or at least the majority) and moved those children into the general school population. This put a lot of strain on the teachers, because they now had to deal not just with slow learners, but also children with learning disabilities and often behavioural problems. This put a lot of stress especially on the lower end of the spectrum.
- the recent appearance of many after-school tutoring programs. Since these are privately funded and operated, they bring a touch of the US' problems: since the rich now have a way to focus their money on only their own offspring, inequality in school achievements is rising.
https://www.dese.gov.au/quality-schools-package/fact-sheets/...
One polarizing topic at the moment is critical-race theory ("CRT"). There are a lot of false claims about what this is. Ultimately, CRT was something taught in law schools. Now CRT has become a catch-all for teaching the true (rather than whitewashed) history of the United States.
A lot of people are opposed to this because they're mistaken about what the goals are or are opposed to people being educated about historical and current inequality. A common argument is that CRT makes children "feel bad". But take slavery as one example. Did you directly participate in slavery? Of course not. No one is asking you to feel personally responsible for this.
But you can be taught the ramifications of slavery that continue to this day. Take something as simple as the GI Bill. This contributed to the White Flight. It allowed white Americans to build up generational wealth. In a system where property values are so entangled with educational outcomes, you should be able to recognize that slavery and segregation aren't just historical artifacts.
You can recognize how you benefit from generational privilege without feeling personally responsible for its origins. An awful lot of people don't want that to happen however.
So how did other countries avoid this? There are many factors here but ultimately the US founding is deeply tied to white supremacy. That continues to thi say. The language may have changed (eg propagandists might now use terms like "legacy Americans") but this belief has never gone away. We as a country have never had a serious reckoning with this past.
50+ years ago towns were racially segregated openly. The term "sunset town" came about for a reason. While those direct segregation laws might be gone they've been replaced with laws and institutions that have the same effect. For example: making housing expensive is exclusionary by design.
I say all this to point out that local funding of education is part of a deliberately exclusionary system. It may not be the reason other countries fund things at a national or state level. But our inequality in outcomes through local funding is deliberate for those reasons.