Talking about education plunges you into the Nature Versus Nurture debate. Stereotypically, nurture argues that social inequality is caused by unequal education, while an extreme nature position says that says that education functions mainly by sorting out the smart people.
Until roughly the industrial revolution, school was for elites. High school has only been universal in US since around 1900. It's odd to argue that universal execution is designed to perpetuate the underclass; this has more traditionally been done by not educating.
Education (or anything else) can never make everyone an elite, but of the levers that are accessible to policy, it does seem like one of the more plausible ways to increase social mobility. One problem with this program is that in countries with historic class inequality, lower classes have culturally differentiated, and to some degree reject the norm of the ruling elite.
Current hand wringing about US primary and secondary education is not about any deterioration in education, it's about increased expectations. Both “other countries have higher scores, and that shouldn't be”, and also a good intention to raise all students up to the level that would enable them to go to college, which is now seen as a minimum credential for a good job. In contrast, many aspects of the system are largely unchanged from the pre-1900 era, when higher education was overtly elitist.
While the desire to insure that “no child is left behind” is commendable, the particular methods (frequent standardized tests, grading teachers and schools) are a huge experiment that isn't founded on science or any actual understanding of how education works. This isn't because reformers are ignorant about how the current system works (though that may also be true), but because nobody really understands how the institutions of education are currently contributing to overall good (see puzzles.) These efforts largely take the current curriculum for granted, yet necessarily also trivialize it because of the limitations of testing.
It is indeed a moral failing that we for years largely ignored the fate of children from poor neighborhoods, and local government was perhaps somewhat complicit in not holding students to higher standards, but simply blaming schools and teachers isn't going to solve the problem, and may indeed make it worse. These schools are now highly motivated to improve test results, but given the loose coupling between curriculum and whatever the actual function of education is, this may not help.
Academic achievement is not just a matter of classes and teachers. Peer attitudes, home environment and sense of opportunity affect motivation. Learning does happen all day long, but what is learned depends on what is on offer. Clearly a large part of the problem is the effects of poverty on the community, creating stresses at home and in school that aren't conducive to learning. Another problem is (sub-)cultural adaptations to poverty and to working class status. If you don't believe you can get ahead, then you weigh things differently, and solidarity with your class mates (both senses) becomes more important.