This is something quite close to me. Our family was fairly poor growing up (though later moved into upper-middle class), and when it came time for college it was a matter of "which college is offering me the most in scholarships?". It was never a consideration to simply choose the highest ranked university. $40k of tuition per year and graduating with $160k in student loans was both unfathomable and untennable.
Looking back on this, it's actually something that I'm now much more unsure about, especially in the light of a fairly large tech salary. When applying to universities, I had an impressive application: a perfect on my math SAT, captain of the football team, professional opera experience, volunteer work and great grades (all credit goes to my parents for pushing me to do all of this). I got into great colleges such as Stanford (#3 on Forbes' university rankings), but turned them all down due to the price. I ended up going to Loyola Marymount (#203) as they gave me a $40k grant for 2 years. When that ran out I transferred and ended up graduating from Hawaii Pacific University (unranked, but objectively quite poor).
Was this the right choice, and would I have made the same call if I could go back? I'm not sure. $160k is much less to me today than it was when I was 18, so the value of the college feels more worth it by comparison. That said, I ended up successful regardless of the university I attended, but this might just be survivorship bias, especially considering when I look around at my peers, almost all of them are graduates of ivy leagues.
From a more objective lens, I think colleges offer three things: education, maturity, and access.
Educationally, there was a stark difference between Loyola and Hawaii Pacific, so I do think there's merit in pursuing a good university, but would there have been the same delta between LMU and Stanford? For that I'm not sure, especially with the resources online today.
From a maturity standpoint, I think I could have gotten this anywhere, as long as it was out of my hometown. Being out on my own was a fairly important aspect of my growth, and interestingly this increased when I moved out to Hawaii and was even further separated. I lived out in Sydney for a bit, and this too stretched me. I'd have loved to have had the opportunity to study overseas for this fact - I think being challenged by a different culture and being out on my own would have amplified the maturization effects of this.
On the access side, higher end universities excel here. They offer both peer connections and a stamp of approval. I've seen these two things open plenty of doors for my peers.
Because of these aspects, I think if I could go back I'd likely pursue the following: Study overseas for the first two years, then transfer into a more prestigeous ivy league to graduate from. Ideally that captures the best balance of optimizing for the three things universities offer, while minimizing the cost.