I'm no expert but I see two ways this could work:
Use different port groups and define different VLAN-IDs for each of them. VLAN-IDs enable you e.g. to split a switch in half to create two separate networks.
Use different vSwitches that are only connected to each other through a single VM (e.g. software firewall) that provides routing between the two networks. Block DHCP traffic.
Option 2 worked fine for me using free ESXi and provides most flexibility but there might be an easier solution using ESXi features only.