I don't think that there is any opponent who would be sane enough to attempt to bring a fight to China's main land proper. The amount of troops, ground to cover and opposition to contend with to achieve a strategic victory of such magnitude that even nations like the US or Russia will find themselves exhausted long before they achieve even the halfway point.
Therefore the PLAN's main job is not to prevent an invasion from the ocean, ground based artillery and air assets will make any attempt a living nightmare, but to ensure that China's sea line of communications are not cut off. Thing is, such lines of communication need not be directly connected to China's shores in order to work. A line established from Gwadar to China's Xinjiang, while it might cost more, at least will be out of the way of any significant conflict in the immediate area.
I would expect the bulk of its naval assets to be concentrated in the SCS, more specifically around the Malacca Straits in any event of hostilities.
You are correct that no sane opponent would ever want to fight China proper on land.
But that opponent may have no choice.
If the US and China get into a naval-air war, how long will it be until we see the Chinese Army pouring into the Korean Peninsula?
The US 2nd Infantry Division based in Seoul will be forced to fight the Chinese Army, and the US will be dragged into that land war in which it cannot achieve a strategic victory.
---
With the current balance of military power, I agree that the main purpose of the PLAN will be to keep the trade routes open.
But realistically, Gwadar is too isolated to support and is there actually any need for a PLAN presence there, if Chinese/Pakistani/Iranian/Afghan trade is completely intermingled at Pakistani ports?
On the other hand, it is feasible for the PLAN to keep the South China Seas open, given the new bases and how close it is to the Chinese mainland. China is the world's largest trading nation with most of that trade flowing through the SCS, and China does sit at the centre of the Asian trade network.
So China will be trying to keep the SCS open for everyone in order to intermingle its trade and break a US blockade.
In comparison, the US will be trying to shut down that shipping. Given how dependent Vietnam, Cambodia, Thailand and Malaysia are on SCS/China trade, those countries will be aligned with China against a US blockade.