An institution can have both. Being good at both is always the goal and they two aren't necessarily antithetical, it is just hard to do given limited resources. "Good" is also not really defined. Let's say good at undergrad education could mean schools in US New's top 100, while good at research might mean being among the top 100 recipients of federal R&D funding, which is the most prestigious and competitive research funding. Of those, how many would you say are "good" at football? Those in the top 25 of AP poll appearances in the last 10 seasons? The ones that are good at everything generally have athletic programs that are more likely to have relatively self-sustaining revenues or have large athletic endowments. There are only 9 power five schools that place among the top half of power 5 institutions in all three measures: US News undergrad ranking, federal research, and top 25 AP football poll appearances.
US News' 25 top ranked undergraduate schools in Power 5 conferences:
Rank among P5. School (US News National Rank)
1. Stanford (6)
2. Northwestern (9)
3. Duke (10)
4T. Notre Dame (15)
4T. Vanderbilt (15)
6. UCLA (20)
7T. Cal (22)
7T. USC (22)
9. Michigan (25)
10. Wake Forest (27)
11. Virginia (28)
12T. Georgia Tech (29)
12T. North Carolina (29)
14. Florida (34)
15. Boston College (37)
16. Wisconsin (46)
17T. Illinois (48)
17T. Texas (48)
19. Georgia (50)
20T. Ohio State (54)
20T. Syracuse (54)
22T. Pitt (57)
22T. Florida State (57)
22T. Miami (57)
22T. Penn State (57)
22T. Purdue (57)
Others in Top 100: Rutgers (62), Washington (62), Maryland (64), Clemson (70), Minnesota (70), Texas A&M (70), Virginia Tech (74), Baylor (79), Indiana (79), Iowa (84), Michigan State (84), NC State (84), TCU (97)
NSF Total Federal Obligations for R&D ranking schools in Power 5 conferences:
Rank among P5. School (federal $ X1000)
1. Michigan ($667,704)
2. Washington ($641,706)
3. Stanford ($552,199)
4. Pitt ($532,632)
5. UCLA ($517,169)
6. Duke ($508,315)
7. Colorado ($495,701)
8. North Carolina ($482,958)
9. Wisconsin ($462,157)
10. Vanderbilt ($409,155)
11. Penn State ($401,853)
12. Northwestern ($393,277)
13. Minnesota ($392,782)
14. USC ($335,332)
15. Michigan State ($304,422)
16. Texas ($296,025)
17. Ohio State ($282,425)
18. Cal ($278,496)
19. Illinois ($274,973)
20. Florida ($252,514)
21. Rutgers ($248,528)
22. Maryland ($234,508)
23. Utah ($231,227)
24. Arizona ($211,508)
25. Iowa ($190,740)
Others in Top 100: Texas A&M ($186,539), Virginia ($182,733), Purdue ($176,446), Georgia Tech ($167,638), Miami ($160,990), NC State ($155,287), Kentucky ($155,115), Arizona State ($153,087), Virginia Tech ($135,038), Wake Forest ($116,632), Oregon State ($116,448), Georgia ($110,652), Florida State ($109,393), Kansas ($109,181), Iowa State ($102,781), Washington State ($98,896), LSU ($96,067), Missouri ($89,180), Indiana ($87,513)
Total Appearances in the AP football poll, 2010 to 2019, for Power 5 Schools (Boise St only non-P5 in top 35)
1. Alabama (163)
2. Oklahoma (159)
3. LSU (151)
4. Ohio State (150)
5. Clemson (140)
6. Wisconsin (128)
7. Oregon (121)
8T. Georgia (116)
8T. Stanford (116)
10. Michigan (109)
11. Florida State (108)
12. Notre Dame (104)
13. Auburn (103)
14T. Michigan State (100)
14T. Florida (100)
14T. Oklahoma State (100)
17. TCU (86)
17. Texas A&M (86)
19. Baylor (85)
20. USC (83)
21. Nebraska (76)
22. Utah (75)
23T. Penn State (70)
23T. South Carolina (70)
25. West Virginia (69)
Others with appearances (out of 96): Washington (65), Virginia Tech (64), Mississippi St (62), Louisville (60), Texas (58), UCLA (55), Iowa (51), Kansas State (50), Miami (49), Mississippi (45), Arkansas (42), Missouri (41), Arizona State (40), Washington State (34), Arizona (30), Northwestern (30), Georgia Tech (21), Tennessee (18), Oregon State (17), North Carolina (16), Texas Tech (16), NC State (16), Duke (13), Kentucky (12), Minnesota (11), Colorado (11), Iowa State (11), Syracuse (9), Rutgers (8), Virginia (8), Cal (7), Pitt (6), Illinois (5), Wake Forest (5), Boston College (4), Maryland (3), Vanderbilt (2), Indiana (1)
The nine Power 5 schools in the top half of all P5 schools in all three measures (with average score):
Stanford (4)
Michigan (6.7)
Wisconsin (10.3)
Ohio State (13.7)
USC (13.7)
Washington (14)
Florida (16)
Penn State (18.7)
Texas A&M (24.3)