Unless virtualization physically prevents the opreating system from seeing the device as such (e.g. the "disk" really being a VHDX or similar), the answer is "yes, of course". There is nothing special needed for that, and nothing you can do to prevent it from happening, once malware has gained admin privileges.
I wouldn't know by heart how to open the device under Windows (something like
\device\harddisk1 or such?), but sure enough I've overwritten the raw device under Linux more than once. Something like
cat /dev/random > /dev/sda has been "working fine" for, like... forever, assuming you logged in as
root. That's poor man's secure erase in lack of something better.
Installing a boot loader (which is part 1 of the ransomware) is nothing but doing just that, only with not-so-random data. Overwrite the boot loader with a binary of yours that shows the "pay me, sucker" text.
Note that this bootloader (nor the encrypt/decrypt portion, if there is a decrypt portion at all) needs to be able to access the partition or the filesystem in a meaningful manner.
Encrypting (or garbling, the user cannot really tell a difference) is the second part, and that is similarly easy. If you can write a boot loader, you can write sectors. So, instead of files, encrypt sectors on the raw device. Who cares about the logical structure inside those sectors when you can make them unusable either way? Different partition type, different filesystem? You couldn't care less. Someone who wants to use them needs to know, you don't need to know.
This is something the malware can do in a few seconds, there is not even much of a need to be secretive or super smart. You do not need to keep a low profile to avoid detection. By the time the user even notices the furiously blinking light on the computer and wonders what may be going on, the malware will already have overwritten hundreds of megabytes (dozens of gigabytes) of data. If the malware writer possesses only a minimum amount of smartness, this is sufficient to overwrite the filesystem metadata on every partition including backup metadata at their respective well-known offsets, and a couple of hundred megabytes of actual file contents.
Certainly, with only the metadata overwritten, it is in principle still possible to recover the contents of the not-yet-overwritten files, but this is an excessively expensive thing to do, and well beyond the average user's capabilities (and may be impossible for small files on some file systems).
You need not even properly encrypt, you can as well just overwrite sectors with garbage data. The user cannot tell a difference, they only realize after having paid if they are so stupid as to pay a criminal in hope the criminal will stand up to his word.
So... yes, technically this is absolutely no problem (for most computers owned by most people).