The only code in common should be the bootloader. One of the Windows installations will have a bootloader that allows you to toggle which Windows installation you boot to. Some rootkits inject themselves into or below the bootloader, so a single infection from that would probably be present for both operating systems.
Aside from that, the Windows installations should operate independently. An infected Windows install would only directly infect the actively running Windows installation.
But they won't be actually seperated. If they're on the same hard drive they will be able to see and access each other, so one infected install certainly could detect and infect the other Windows install. (And it is probably easier to infect a system that isn't running than one that is.)
Both should be protected.