My former priest, who is a retired public school teacher, has often told me that it's possible for a child to get a good public school education anywhere in the country, provided that the parents are properly involved. His own four children all excelled in school, not least because their parents made sure they understood that getting an education was their job. Schoolwork and homework took priority over extra-curricular activities, hobbies, or social life. They were also expected to qualify for, and do well in, advanced placement courses.
On the other hand, if parents aren't properly involved their children's education, the children may fail to be educated regardless of where they go to school.