I don't really know the answer to this, but I think it'll be a problem. It seems to me that the executable header is going to be for 32-bit or 64-bit... not both.
I have seen a "trick" employed (Herbert Kleebauer) in which we start off as a plain .com file - no executable header at all. One of the functions of this .com file is to write a new disk file with a Windows (PE) executable header on it... and execute it (delete the file afterwards to preserve the illusion of "magic", if you like). A similar trick with a 32-bit file writing and executing a 64-bit file might work. Doesn't seem practical.
The normal "dos stub" in a PE file just says "This program requires Windows" and quits. More functionality can be incorporated into the "dos stub" if you like, producing a file that will run in either OS. I doubt if a PE for a modern OS even has a "dos stub", since dos is no longer supported.
Maybe someone has a better answer to this, but I think if you can do "the necessary" in 32-bit code it would be simpler to leave it as 32-bit code Further discussion welcome - it's an interesting question.
Best,
Frank