You are factually wrong, a Yemeni does not need to pay 100+ years of salary to get a CS degree, end of story.
Also, I've been a researcher and have few scientific papers published (you can search for my name on scholar: Enrico Polanski) and I've seen ZERO evidence that a student from Harvard or Imperial to be more knowledgeable than one in unnamed universities from the third world you've never heard about. None.
It's way too personal and student dependent. Plenty of people in ivy league famous colleges study to ace exams and don't remember shit few weeks later. Plenty of people in unnamed universities are genuinely curious.
Your college makes very little difference in how prepared you will be. Single teachers/courses may have an impact, but the location very little.