Good that you already solved the part of switching from Windows to Linux.
The other direction is not that hard:
There is the command
grub-reboot that does just what you need - see below for detais:
grub menu entry for the system you want to boot is "Windows", you would just do:
$ grub-reboot Windows
If you configure the hardware to boot after a power failure, I see no reason the computer could not just stay running.
But if not, it should be possible to wake it up with wake on lan (WOL), booting the system you configured before shutdown.
The WOL works with "special" network packages that can not be routed outside the local network, so there is a device needed in that network, like a some DSL router or any computer.
man 8 grub-reboot:
GRUB-REBOOT(8) System Administration Utilities GRUB-REBOOT(8)
grub-reboot - set the default boot entry for GRUB, for the next
grub-reboot [OPTION] MENU_ENTRY
Set the default boot menu entry for GRUB, for the next boot
[ ... ]
expect GRUB images under the directory DIR/grub instead
of the /boot/grub directory
MENU_ENTRY is a number, a menu item title or a menu item iden‐
tifier. Please note that menu items in submenus or sub-submenus
require specifying the submenu components and then the menu
item component. The titles should be separated using the
greater-than character (>) with no extra spaces. Depending on
your shell some characters including > may need escaping. More
information about this is available in the GRUB Manual in the
section about the 'default' command.
[ ... ]
man -k grub for a list of related command - eg.
grub-set-default may help you too.