Hi Matthijs,
Shanghai and Hong Kong can not be mentioned as the ship spotting locations in the same sentence, IMHO.
Shanghai port is off limits - assuming you will be coming as a tourist, not as an officer on board the ship - and that is before we even mention the haze.
Shanghai will offer closer looks at the vessels on the Huangpu river, and its skyline is fantastic (although not as good as Hong Kong's), but it will mostly be smaller Chinese vessels.
As for Hong Kong, there was a query not so long ago about ship spotting locations at Hong Kong here on this forum, so look it up.
Cheers
Vlad