What major you choose, not what college you go to, matters the most when looking at lifetime earnings. The Hamilton Project at the Brookings Institution looks at what undergraduate majors earn the most and the least over their lifetimes:
As usual, engineering majors are at the top, earning more than $2 million on average during their working lives. People who majored in early childhood or elementary education are near the bottom — below the average associate's degree recipient. The chart only includes people with bachelor's degrees, so it doesn't look at history majors who go on to law school, who presumably earn more.
And the gender wage gap plays a role here — as sociologist Ben Schmidt points out, while the average finance major earns more than the average nursing major, women who are nurses earn more than women who majored in finance.