I'm mainly comparing people of comparable age, and including all the possible "scientist" career paths (not just the very successful paths). I'll use NYC salary schedules for concrete numbers.
http://schools.nyc.gov/NR/rdonlyres/72DE1FF1-EDFC-40D7-9D61-...
22. (fresh out of college). Teacher gets $45k (for working 9 months/year) with great benefits + defined benefit pension. The scientist (grad student, working 12 months/year) gets about $20k. With some luck, the grad student gets health care.
27. (PhD granted). Teacher is up to about $50k, maybe more, and has tenure. Scientist will, with luck, get a job as a postdoc. Pay will range from $30-60k, and his contract is up after 3 years. Many scientists will fail to get a postdoc, and will either work at a low end teaching college (pay ~ $30-45k), become an adjunct (usually with pay < $20k) or leave the field entirely.
30. Teacher is up to $60k, maybe $70k if they got a masters. If the scientist gets a tenure track job, his salary is up to maybe $80k (if he works at a Research 1), or considerably less if he doesn't. He might instead be working on his second postdoc (pay $30-60k). Or he might be working at a low end teaching college (pay perhaps up to 50-60k), or still an adjunct (pay < $20k).
In some cases, scientists in this age range might go to work at the corporate "Research Scientist" jobs you described. In that case, they might be getting around $50k, perhaps up to $120k in hot fields.
35. Teacher, if I'm reading the NYC chart right, is between 70 and 85k. The scientist might have gotten tenure, in which case he is probably making close to $100k. He might not get promoted, in which case he is back to $80k (assuming he finds another tenure track job). He might be working on his third/fourth postdoc, where he is still in the $30-60k range. Or he might be an adjunct, pay < $20k.
The top scientists are certainly paid better than teachers. But most scientists are not. And adjusting for time worked (teachers don't work very hard, scientists do) and 3 months of vacation, scientists are definitely paid worse.