At undergrad level, there is the BS (Research) programme, where you get through the KVPY exam, a specialised test for HS seniors for entry to this school only. (You can look up papers if you want)
Then, for entry to grad school, you have to rank near the top (~200 , ~60-100 for AI) among 100k (for CS paper candidates). And then you have to pass rigorous technical, and personality interview(s).
So, they take in the best students.
This institute always ranks the highest in internal rankings.
The labs are top-notch, the uni is cash-rich, and the faculty is as good as US unis (maybe not Stanford, Ivies, etc.).
I know multiple people who went there and/or still lives there.
I hear only good things.
But, yes, the people who are opting for grad schools after a 4 year CS degree are almost always from upper middle class and rich families (studies in India are almost always funded by parents unless you were already earning in a full-time job).
So, yes, the populace you would find there are almost all from affluent families, but there are some people from financially challenged families, too.
The undergrad exams are very hard and you can appear only once. I blew my one chance because I had severe typhoid at the time of the exam!
Now, if my plans to get into a grad school in North America / EU does not pan out, IISc is right at the top of my choice list in India.