I'm from a very small country, Singapore, with a robust public school system which all citizens' children must go to by default. The best public schools are the best schools in the country, and the private options are in fact much worse than the top public schools. The high school I attended routinely sends a significant portion of their cohorts to Ivy Leagues / equivalents in other countries. Teachers are well-trained, and generally always have time to provide academic support. Physical facilities are excellent. The academic atmosphere is strong and students work hard, and being there encourages you to work hard alongside your peers.
I would suggest the following traits for a good school system:
(1) Merit-based entry: children who do well in exams get to go to better schools and challenge themselves by comparing themselves to other better students. This way you can tailor teaching to both poorer students and stronger students. Some rural areas may not be able to support this due to population sparseness.
(2) Decently-remunerated teachers: there's a funny quote from the country's founding-father guy: "you pay peanuts, you get monkeys" (he meant it as a justification of ministers' high salaries).
(3) Does not matter if class sizes > 20. Small class sizes do not help with student outcomes. There have been some good American statistical studies of this. The reason people think that small sizes help is because posh schools with better students and better teachers and more resources tend to have small class sizes.
(4) (Culture) Respect for discipline. I don't understand why American culture looks down on "nerds" and lionizes "jocks". Children/students should be disciplined and taught the consequences of their actions.