Typical ignoramuses and Racists tend to generalize and turn it into a stereotypes.
India is a complex society. You will find enough extremes and contradictions to over-generate and validate opinion of every shade and perspective. Anything you say about India is true and also a lie, and you will get ample proof of it to cite it. You will find whatever you are looking for - good, bad or ugly. Thats why most narratives do not prevail nor endure.
Generalizations happen because they are generalization. There are always exceptions to any generalization but that doesn’t mean a generalization isn’t true.
Worked in IT for nearly 30 years now… and I have been exposed to countless Indian software engineers in that time.
In those 30 years the generalization that they are not on par with other places is true, in my experience. I have met and worked with exceptional Indians and I have worked with a lot more who prove most of their universities and schools are little more than paper mills.
I would also say that in general things have improved in the overall quality of software engineers in the last decade vs the previous 2.