This is a geopolitical clash of power. It's not about respective political regimes, it's about relative power and influence. If China liberalises tomorrow none of the fundamental issues will change and China will still be a threat to the US. The only thing that will change is that the US will have to find something else in order to label China 'evil'.
India is not re-educating anyone, but rules out muslim from citizenship? Not even mention the caste system, which is way worse than the color discrimination in US. When India became the 2nd biggest power in the world, all these will become target
India is actively trying to fix disparities caused by the caste system. It took the US 200 years to get civil rights, India had affirmative action from day one, and one of the biggest examples of affirmative action at that. The caste system is horrendous, but social change can never be brought so quickly ( atleast in a democratic way, we certainly don't want Stalin or Mao style quick changes)
The caste system, while bad, isn't in any way worse than color discrimination in the US. To quote just one example, India has very strong laws against caste based violence.
India has it's own shares of issues, but it's still an order of magnitude better than the Chinese Government.