I went back and checked LinkedIn for some of my old HS people, and it's interesting how different that patterns are. The children of doctors are doctors or lawyers. Some of the really motivated children of first-generation immigrants ended up equally successful though. Both groups tended to go to private institutions though.
I wonder if the difference is how risk is evaluated. Middle classes see hard sciences and engineering as reliable, accessible, career paths that minimize risks of joblessness and allow them to leverage existing connections by staying in state while studying (since most working and middle class folks have a family support structure local to the area, also in-state discount) without burdening their family more by picking a field where paid internships are rare.
Meanwhile, richer folks are not worried about needing to work while studying, and they don't need to stay in any one place, especially if the careers of their parents gives them connections to in-demand places for jobs and study (or maybe money just makes connections unnecesary).