Beating "us" at what?? Cheap labor? Human rights violations? Mass poverty?
Beating us at being a world power. Yes, we are still ahead. But the first derivative favors China.
I just read a great article on Gao Xiqing, a Chinese official who oversees $200 billion of China's US investment. Studied and worked in the US. He probably has a better sense of where the US is heading than most of us.
He criticized the tendency for the brightest Americans to pursue Law, MBA, and finance rather than engineering/science. (Caused by salary imbalance).
In the long term, if a country full of lawyers, MBAs and financial wizards, with no industrial base, gets in a war with a country of engineers and scientists with a huge industrial base, what do you think will happen?
Your experience is limited to dealing and interacting with Chinese/Indian/etc software engineers who are most likely members of the upper echelon of their country's respective caste systems. The ones with the opportunities to study abroad, attend universities, build careers, etc. Of course it will seem like the entire population values education as highly as you make it seem if that is all you deal with.
That's a good point in general. But my co-worker's children are in school in China, because American school doesn't challenge them. I forget the exact delta in math education, but it's big.