Yes, but it is more complicated. You can authorize someone in China to apply on your behalf, using a notarized letter of authorization and authenticated passport copies; in Shanghai you can also apply through a notary office after leaving.
Nationwide (all cities)
Possible but more involved
If you have already left China, you can still obtain a no-criminal-record certificate, but the procedure is more involved than applying in person.
Local variations
Shanghai
In Shanghai, if you are outside China, you may authorize someone residing in Shanghai to apply on your behalf. They need your original letter of authorization — notarized in your place of residence and then either authenticated by the local Chinese embassy or consulate or, where applicable, issued with an Apostille — a copy of the bio page of the passport you used during your stay in Shanghai, and the original and a copy of the authorized representative's identity document. The certificate can also be collected by an authorized representative, provided the original receipt from the time of application is presented.
Shanghai notary office route
Separately, the Shanghai Minhang District government explains that a foreigner who has lived in Shanghai continuously for at least six months can, even after leaving, still apply at a notary office in Shanghai for notarization of having no criminal record. For this you provide your passport, proof of six months' continuous residence before leaving (such as the temporary accommodation registration form, a work residence permit, or wage tax records), and the no-criminal-record certificate issued by the exit-entry administration.
Shenzhen
In Shenzhen, the Guangming District government notes that obtaining the certificate normally requires the person to be present, and that if you have already left China, the information the agency requires is more intricate. For an agent to apply on your behalf after departure, you need: the Chinese visa page of your passport and the residence period, authenticated by a Chinese embassy or consulate; a temporary accommodation registration form; and a power of attorney certified by a Chinese embassy or consulate. It also recommends applying for two or three notarizations after you obtain the certificate, because many people later need a notarized copy for a work visa, study visa, or permanent residence application in a third country.