Gaza has a sizable coastline, and China has a large number of amphibious assault ships available. They can defend themselves against Israel air attacks. If China decides to send humanitarian relief to Gaza, China can do it, and Israel can't stop them.[3] China would look like the good guys. Which their leadership knows.
[1] https://www.foreignaffairs.com/china/chinas-game-gaza
[2] https://edition.cnn.com/middleeast/live-news/israel-hamas-wa...
[3] https://www.newsweek.com/china-amphibious-assault-ship-type-...
Chinese warships will never be allowed anywhere near the Mediterranean in the first place - if there is one thing that even the split US Congress will agree on, it is that China already has too much influence and that they need to be stopped.
Additionally, China's army hasn't seen actual combat in a loooong time. It's likely that their army is in just as bad of a shape as Russia's is, and getting that demonstrated on the world stage before they have a chance to snack a piece or the whole of Taiwan would be pretty foolish.