To wire this properly, you have two options.
- Run a 14/4 (or 12/4 if it's a 20 ampere circuit), or 14/2/2 (12/2/2 for 20 amperes) plus ground nonmetallic sheathed cable (Type NM) between the switch and the fan.
- Install conduit and run individual conductors between the switch and fan.
There's no way to wire this in a code compliant way, using two 14/2 with ground cables. You'd either violate 300.3(B), by not having all the conductors in the same cable. Or you'd violate 310.10(H)(1), by having paralleled conductors.
Using 14/4 is the easiest, since the wire colors should match up. Simply collect all the white wires from the fan, and connect them to the white wire from the 14/4 cable. Connect the bare ground wire from the cable, to the green wire from the fan. Then just match the colors, black to black, red to red, and blue to blue.
At the switch, connect all the grounds together. Connect the white wire from the 14/4 cable, to the feeder neutral. Connect the black wire to the fan switch, the blue wire to the light switch, and the red wire to the heater switch.
If you're using 14/2/2. Instead of a blue wire, you'll have a white wire with a red stripe. You'll have to mark this wire at both ends with a marker or tape, to reidentify it as a hot conductor. Once that's done, simply substitute it for the blue wire in the description above.
If you install conduit, you can use whatever code compliant color wires you want.