Undergrad - minimize debt (preferably zero) with the best mix of school experience and school reputation for grad school.
Grad school - get into the best school you can as long as the debt will be manageable with the chosen career path.
Kids from middle class families with good grades and SAT can be wise to downgrade the undergrad school choice so they can maximize scholarships and stay out of debt.