Is higher prestige for undergrad worth the cost if I plan on doing a PhD?

I recommend looking at each school’s acceptance rate into PhD programs in your field. It’s possible that there is a significant difference (and possibly not favoring the higher-ranked program.) Hope that’s a helpful thought.