Peripheral in/outputs of basically all Cortex M devices are in a high-impedance state (Z) after startup or reset.
Peripheral units need to explicitly be enabled to work (power and clock).
To be safe, I would highly suggest to add pull-up or pull-down resistors to your relais drivers, to ensure startup in a safe state. The value should not interfere with the operation once the GPIO is enabled.