The Mode (Legacy BIOS or UEFI) is determined by the bootloader that is installed on the USB-Stick and BIOS settings.
The Windows 7 installation medium should support both (Legacy BIOS and UEFI). For the latter, it depends on your settings. But since you can boot from your UEFI-HDD and your Win7-USB-Stick boots into Legacy BIOS mode, it should be set to "both" meaning that your BIOS supports UEFI and as a fallback can boot into Legacy BIOS mode.
In order to solve the problem I would advice you to install using a Win7-Image with UEFI-support (I don't even know, if there is one without) and also you should set your BIOS to UEFI mode explicitly (no combined mode).
But if this doesn't work and in order to answer your question: This should work:
Place the Win7-Image on your HDD or USB-Drive and choose the right modules (follow the comments):
menuentry "Windows 7" --class windows --class os {
# Insert modules needed in order to access the iso-file
# choose the right module for the partition-table-scheme the image lies on
insmod part_gpt
insmod part_msdos
# choose the right module for the filesystem the image lies on
insmod ntfs
insmod fat
insmod ext2
# Insert module needed in order to find partition
insmod search_fs_uuid
# Set UUID of partition with the iso-image
# and let grub2 find the partition
# (save it's identifier to the variable $root)
set uuid="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
search --no-floppy --set=root --fs-uuid $uuid
# Mount the iso image by addressing it with (partition)/path
set iso=/images/Win7_English_x64.iso
loopback loop ($root)$iso
# boot (chain-load) the windows7-image using the bootmgfw.efi file located
# on the Win7-ISO-Image
chainloader (loop)/efi/microsoft/boot/bootmgfw.efi
}
If you want to dump the image directly to the usb-stick then you should leave away the set iso=- and loopback loop ($root)$iso-parts, that are needed in order to mount the iso. Your chainloader is then chainloader ($root)/efi/microsoft/boot/bootmgfw.efi