Poland is not miles ahead of the US on education at the median, that is not remotely close to being true.
http://www.oecdbetterlifeindex.org/topics/education/
Nationally the US is near the OECD middle, and ahead of both Britain and New Zealand on education. Poland certainly scores well, not "miles ahead" well.
About 1/3 of Americans are getting a four year degree these days. The university systems in the US are vastly superior to anything Poland has. A third tier university in the US is as good as a first tier university in Poland. Forget about the second or first tier universities, Poland has nothing like a University of Virginia, Michigan or UCLA (all second tier), much less the elite schools. Which is why Poland isn't producing very much in the way of innovation or economic output. Poland's economy hasn't net expanded since 2008 (even before the pandemic), if their education system was so great it would show up in their economy.
Poland is also not miles ahead on healthcare at the median. The median American has full healthcare coverage and has faster access to healthcare than most socialized medicine nations, including Canada (where you'll wait months or years for procedures that Americans can get in weeks). We're talking about the median here, which is: an American earning $40,000 to $60,000 per year, with health insurance and richer than the median in either Germany or Sweden. The median American also has routine access to the latest medical technology, which the median Polish person has zero access to.
Miles ahead? Nope.
And if we're comparing fairly on demographics, the median white American demolishes the median white Pole, dramatically and across the board. The median white American is among the wealthiest medians on the planet (three times richer than the median Swede or German) and has an extreme income only comparable to nations like Switzerland and Norway. The US has taken on a dramatic amount of third-world immigration over the past ~45 years, which has persistently pushed against its median scoring as poor third world immigrants flood into the US (which debases the median as it happens). It takes a long time to lift the education and income levels for tens of millions of people coming from the third world with absolutely nothing and having to learn a new culture and language. That said, pretty soon the median Hispanic person in the US will be richer than the median German or Swede as well, so progress is occurring rapidly.