Where I live, the quality and safety of the public schools is directly correlated to the property values in each school district. Wealthy areas have great schools with nearly perfect graduation rates. Inner ring suburbs have lower property values and less funding and more students with problems. Inner city schools have lots of funding but a lot of students with problems. The experience of students in public schools is highly variable.
The socioeconomic status of the parents of the students and the amount of money available for funding determine how good or bad public education is.