Einstein didn't attend the American public school system, nor did Dyson, or many of the other great scientists of the early 20'th century. In the present day, Sergei Brin only spent 4 years in US public schools. Elon Musk didn't, nor did Max Levchin (Thiel's wikipedia page is ambiguous). Zuckerberg didn't go to a public high school either (don't know what he did before that).
You can't point to a country with massive contributions from immigrants, and then declare that services those immigrants didn't use (or used minimally) are the cause of prosperity. The logic just doesn't work.