China's unlikely to invade India, even over Kashmir. Pakistan maybe, but nukes make things a spicy situation. Though in the event of an invasion how would Pakistan or China win?
You are correct that China has no reason to start a fight over Kashmir; China already has all of Kashmir (specifically, the region administered as Aksai Chin) that they actually want/need, and only India contests that. The major site of conflict between China and India today is the region between the de jure border and the Line of Actual Control in Arunachal Pradesh, which is also Chinese-occupied but has recently become more of a point of contention. That said, the fact that these in my opinion are the closest potential shots at getting into a full shooting war India has, however, should suggest how likely it is to me that India will get into a full shooting war.
That said, in the event of an invasion, either nation would win by securing limited objectives and preventing India from retaking/taking the lands occupied, regardless of whether they come to permanent terms after or not. An attempt to invade the Indian heartland would run into tremendous logistical difficulties, but is thankfully completely unnecessary to actually win. China has the advantage over India as they already occupy pretty much everything they want in both Kashmir and Arunachal Pradesh already, giving them a defensive advantage in difficult terrain, and in both areas have a huge advantage in available forces and in logistical development to move more forces and supplies to the front; that situation has only worsened for India since the last war in 1962, in spite of Modi's attempts to change the situation of late. That is to say, China has in fact already demonstrated the viability of this strategy in how they took these regions in the first place. Pakistan is, however, a wreck, coming up short in numbers, conventional arms, force projection, and domestic unity; short of nuclear arms, I don't believe they would stand a chance, especially if it escalated from Kashmir alone into a full war along the entire border.
EDIT: Grammar pass.