I am not a Windows developer, but I have been a long-time tinkerer and user. The 32-bit versions of Windows, even up to and including the previews of Windows 10, still include the same old NTVDM that provides support for 16-bit DOS and Windows programs. I've personally played around with running completely unmodified copies of MS-DOS Executive from Windows 2.x and 3.0, Program Manager, and various other ancient things with absolutely no trouble. This likely includes some very old code to allow this old stuff to run unmodified. There's been a bug or two in NTVDM that date back to the first versions of NT.
As for early Win32, modern versions of Windows, including 64-bit versions, will still run the early Win32 demos that came with some of the earliest Windows NT 3.1 betas and pre-releases (once the executable format stabilized).
Now whether this means there's actual literal old code still floating around, or just reimplementation of old libraries and APIs is anybody's guess. Based on some of the security flaws that have cropped up that date back to the earliest versions of Windows NT it certainly seems possible that there's some very old code floating around still. As a closed-source project, we'll likely never know. Though it'd be interesting to poke around in the leaked NT4/Win2k source from several years back and see if there's any clues. In general, rewriting tested, vetted code is a bad idea unless there's a good reason to rewrite it, so I'd bet there's plenty of old code kicking around in Windows in driver handling, kernel memory management, etc.
OS X is somewhat different since it was more or less reimplemented from the ground up rather than evolutionary from existing Mac OSes - though it'd be interesting to see what might be left over from NeXT or BSD. I believe Carbon is still part of the OS, even if its deprecated; I'm even less of a Mac dev guy than I am a Windows dev, so I can't speak to the existence of old code in that.