Again, for its size and economy, India did far better than expected. Do not forget that Pakistan was ahead in development from the 1960s to the 1980s compared to India, but the reversal came in the late 1990s. If you look at the sectoral economic composition makeup of the three countries, Pakistan and India align more than India and China. Hence, the comparison is very valid in this case; the societal makeup is similar.
China has a different sectoral economic makeup, but remember that it has had direct funding from the West since the 1970s. It is a one-party rule with a target to achieve. It had the bureaucratic stability that neither Pakistan nor India had. The West opened its educational institutes to the Chinese, and many educated Chinese returned to build their nation. Compared to the former two countries, China focused more on industry and services. But even before that, it had Soviet Union inputs that allowed China to lay the foundations.
---
The Indian economy is making inroads into pharmaceuticals, services, and manufacturing. It will take time for it to adjust to the market away from a heavy agricultural base economy from 17% of GDP down to 5-7% and increasing the other sectors' contribution to the economy. It's doing it, but it takes time to build the required chain.
---
Your middle paragraph can be reflected on Pakistan, almost mirror-like, by using its own characters. While we do not have a strong caste-based system, there are biases that affect Pakistan just as equally. I've seen places that resemble slums in Pakistan, and you can see the wealth disparity between the two.