At least a good school does provide the opportunity, from stories I've heard from people who have worked at or attended bad schools it would be an environment where it would be basically impossible to learn anything even if you wanted to.OK, this is just one anecdote, but...
I grew up in a fairly rural, poor part of North Carolina, went to generic, poor to below average public schools, came from a dirt-poor family that most people would describe as "white trash" or "redneck" or whatever... my father dropped out of school in 8th grade, and my mom finished H.S. but never college.
But, despite not going to a "good school," or growing up in a household full of academics, or living in an affluent neighborhood or anything, I always managed to keep learning, and things turned out fairly well for me (to date). I went to college, gaining (over the years) 3 A.S degrees, and not quite bothering to finish my B.S. I've worked professionally as a software developer for the past 12 years, and have broken the 6 figure / year salary margin (while still living in NC, mind you).
When I look back at my own travails, I agree with the sentiment that "people who want to learn, will." If the classes I was in were boring as %!#^ (and they were) I went to the library and checked out books. Even my poor ass rural public school managed to have a library, and there was the local public library. And even though my family was poor, we went to things like the once per year "library book sale" at the main public library branch, and bought books for $0.25 / each... I'd go and bring back boxes of books on science, math, electronics, software, etc. And I read, and I hacked on shit in my spare time, and read more, and pursued the stuff that interested me. Honestly, I'd say my school (I'm talking elementary school through high-school here, not college) had little to nothing to do with what I learned, and my outcome in life.
Again, just one anecdote, and admittedly a personal and biased one from one limited perspective... but I don't put much stock in the idea that it's "impossible to learn anything" pretty much regardless of what school you attend.
I guess it's one reason I get annoyed when people talk about "Horatio Alger stories" as though they were a myth, or believing in them was some kind of logical fallacy. I %!#^ng lived that story, so I know first-hand that it's possible to ascend from poverty to a decent lifestyle through a lot of hard work and determination.