Teachers are definitely overcompensated for the lousy job they are dong in most big city districts, where half the kids drop out before HS graduation, and the other half graduate not knowing how to read, write, or calculate.
If you need any proof that teachers have a great retirement (at taxpayers expense), just go and look at the cars in the parking lot at any Retired Teachers' Convention! All the latest and most expensive models of Lexuses, Caddies, Lincoln Town Cars, etc.
Many of those districts could definitely improve, although there are a few great schools in those type of districts.
It's more difficult when you have students coming from dysfunctional families, being raised by one parent, parent(s) who had said children at age 14 or so, or maybe grandma or auntie because the parents are in jail or on drugs. Or maybe they're living with the drug addicts.
That sort of district generally has high absenteeism, lots of behavior problems, and students generally aren't exposed to reading at home. Some schools do a great job, but it's very hard for schools to do it all.