Reverse engineering a particular system's hardware architecture and emulating it is apparently legal in most (if not all) jurisdictions. Otherwise you wouldn't find emulators for game consoles so easily. See the link provided by Derfder in comment for details on how this is considered by the US courts. This is for the hardware side of things.
But as you said yourself, the software running on those systems is most of the time proprietary. It's thus perfectly illegal to distribute ROMs for emulators without the owner's consent. If the owner doesn't care, then it's abandonware and you're in a grey area. Probably most of the ZX Spectrum games can be considered abandonware today, but I wouldn't be too confident either. That's why most emulators creators never ever distribute ROMs.