Egyptian is almost certainly not independent of Mesopotamia (or actually a common "writing ancestor" that influenced both). China, given the time frame, most likely was not independent either. It's the same propaganda you see when it comes to agriculture. Just because you independently come up with new and unique symbols does not mean you didn't borrow the "concept" from elsewhere. That's what happened with domesticating animals and plants; and writing as well. Once you know someone has done the idea, it's easy to look around you and copy it locally your own way. But it still doesn't make it independent.
Conceivably, there are only
two inventions of writing whose mutual independence is almost watertight: Near East and Mesoamerica.
(There's also a small case for the Vinca symbols, by the way, but we have nothing like significant proof that it was actually writing - and little chance to ever get any; I am under the impression that we simply don't know enough about them, and we are unlikely to discover something that changes this).
The point is, however, that, unlike other cases where evidence for inspiration or derivation is actually there, we do not have any evidence whatsoever for Near Eastern influence, derivation or ispiration upon the earliest known writing in China. It is true, on the other hand, that the earlist phases of development of writing in China are essentially not documented
at all (unless recent discoveries I am not aware of have been made). The aspect of the Shang characters, however, with its pictographic features, strongly suggests independent development. Furthermore, to best of my knowledge there is no known venue of contact that could provide
the idea of writing to the Chinese from the Near East in the relevant timeframe. I am not aware of a single potsherd of anything resembling writing East of Elam and West of China in the mid-to-late Bronze Age (that would be big news). There's Indus Valley script before that (and possibility of some sort of writing remaining in use in India on perishable materials after its collapse, although no proof), but, AFAIK, there's not any sort of documented contact between India and China at the time (which would be centuries before the Shang oracle bones). And let's not even begin with the question if the Indus Valley script was actually a script (there's been some fairly nasty dispute about it; I am inclined to think it was, FWIW).
So, at the present state of knowledge (or lack thereof), I think that the case for independent writing in China is reasonably solid.
Much less so for Egypt indeed.
The full sequence of writing development is only fully documented in Mesopotamia. We can therefore assume with good confidence that the Early "Sumerians"* between the Late Uruk and Pre-dynastic periods, in the late fourth millennium BC, made the invention on their own, through a series of decently clearly understood steps, as an evolution of early methods of centralized bureaucratic accounting used by temples and palaces. Simple considerations of geographical and chronological proximity make the idea of contact/inspiration from Mesopotamia to Egypt far more plausible than it is the case for China.
However, currently available evidence does not support it. Recent discoveries point to writing existing in Egypt earlier that previously thought (and closer to a time when it had just barely emerged in Sumer) and also suggest a pretty different employ, and possibly origin, that is not as tighly related with accounting and bureacracy, and more closely to ritual/funerary contexts. This might be, however, a fluke of what documens made it to us.
One could posit the reverse way (Egyptian inspiration to Sumer) but this is unlikely in the view of the aforementioned decently clear internal sequence we have in Mesopotamia.
There is also no writing whatsoever known in the intervening regions in the relevant time, although this is not a clear proof of much since we DO have good reason to believe that trade contacts between Sumer and Egypt existed even that early.
In the end, some degree of cross-fertilization or influence, or Mesopotamian inspiration, is certainly possible with regard to writing. We simply do not have any sort of evidence about it, and some hints pointing to the contrary.
I am of two minds on the topic myself.
I feel reasonably safe saying (as I will tomorrow, to my students) that writing was invented independently
probably three times, and
possibly four. But the end, of course, we don't know.
I admit, anyway, that is based on
the absence of proof, not on the proof of absence**.
* Quotation marks because it is not to be intended in ethnic terms, and the Sumerian identity of the written language can only be ascertained in the period, when writing was already developed.
** I cannot think of how absence of contact can be proven.