Sort of. Submarines are a ranged unit, but they have the <OnlyInDomain> flag, which prevents them from using their ranged attack on anything other than a naval unit. You can remove that flag (set it back to false, the default), and the submarine will now be able to bombard cities. Unfortunately, it'll also now be able to bombard land units, who'd be incapable of seeing the sub, so I'd REALLY not recommend doing this.