I know a number of engineers from India, China, and other countries who did undergraduate work in their home country and graduate work at well known schools Including MIT. I know several others who did graduate work at Tx Tech, Purdue, UCSD, New Mexico State, you name it.
I know one person (US citizen) who did an undergrad at a modest LAC and did a graduate engineering program at GA Tech.
So, no, I don’t think an expensive undergraduate degree is necessary. But if you can afford it and the school is a good fit, it isn’t a crime either.