I'm not sure that's true for science.
Harvard is a biomedical behemoth, especially once you include the affiliated hospitals (MGH, Brigham and Women's, Dana Farber, Beth Israel Deaconess, etc) and research institutes (Broad, Roland). Harvard proper and MGH each receive about a half billion dollars a year in NIH funding. These are usually listed separately in those "league tables", but the whole system must bring in nearly $2B/year (out of a total NIH extramural budget of ~$28B).
The other Ivies aren't as big (though not much else is), but all of them have well-regarded medical schools (except for Princeton) and biomedical research programs. Yale, Havard, and Princeton have pretty credible chemistry programs too. Princeton also has the Institute for Advanced Study, which has hosted a crazy number of Nobel/Fields/Wolf/Cole prize winners; it's formally independent but...right there.
It may be debatable how much this matters for undergrad teaching--is it better to have a world-renowned expert or someone invested in teaching?--but for anything involving research (including undergrads), they are definitely way up there.
(No argument that JHU, Stanford, and other places (CMU, UMich, NYU, etc, depending on field) also have intensive research too).
NIH funding data from here: https://report.nih.gov/award/index.cfm