You could if the grounds were unswitched - but No, you cannot directly share the ground between two different switched devices running from different voltages, when that shared ground is being switched.
When the relay contact is open, 12V can pass through the heater and fan motor to the 5V supply! That can definitely mess things up!
I'd leave the fan running and just switch the 12V positive supply to the heater; or use a two-pole relay, or a 12V fan, or a second small 5V regulator - or just appropriate resistor in series with the fan.
Also, take the heater negative back to the 12V input negative rather than the 5V regulator output negative, just to avoid any offset voltages within the module or wiring.
(When working with mixed items sharing a ground, a "star" layout is best, with each part wired separately back to the 0V or negative at or against against the power source, for the respective voltage
That avoids the voltage drop caused the current in one wire being added in to the voltage drop in another parts 0V connection).
Flywheel diodes are also essential across any inductive part (relay, solenoid, motor etc), as ZZO said.