In Meraki, warm spare between two MX is a little bit different than mentioned vendors, In Meraki warm spare configuration, the Spare MX syncs the configuration from the primary MX only, you do not need to configure the spare MX separately, it just sync the configuration from the Primary MX only, so according to your scenario you just need to go to primary MX > Addressing and Vlan and configure the vlan there only (i.e. subnet eg.1.1.10/24 and a vlan IP is given eg.1.1.1.1).
Now for the heartbeat, either you can connect two MX directly on the lan with the ethernet cable or can be done using the switch in between as well, the only requirement is that VRRP packets should be reachable on both side otherwise you can run into the dual master scenario (where both the Primary and Spare MX report in Dashboard as being Active (master). This can be observed in Dashboard under Security & SD-WAN > Monitor > Appliance status and comparing the current state of each appliance.
This will occur if the Primary MX is online and sending heartbeats that aren't seen by the Spare, resulting in the Spare thinking that the Primary is down. If both the Primary and Spare are in the master state, this will cause various issues with the network, affecting DHCP, routing, VPN, etc.)
.
Following is the recommended design when you connect two MX using layer 2 switches in fully redundant mode.