The issue with IP addressing isn't about how the switch forwards your hypothetical frames, but about how a host generates those frames.
The host checks the Packet destination IP address before deciding how to encapsulate it in a Frame. If the IP Packet destination address is in the same subnet as the sending host, then the sending host issues an ARP request broadcast to find the destination host's MAC address. It is probably possible for you to do something to your hosts ES2 & ES4 so that they can be members of two VLANs using two interfaces which are both addressed in the same subnet. (Like, maybe some static routes as well as static ARP entries so that it knows which interface to use for which remote host.) But why? Why not set it up like a real network?
OK, so I get you want multiple VLANs coming out of a switchport so you can analyse the switchport functionality.
This is real life networking - for example, in a server room, you might have a rack full of ESX servers running VMWare with multiple servers running on it. Often, there will be servers in different subnets, so you might trunk multiple VLANs to the ESX servers.
In your case, the ES2 & ES4 are like these ESX servers.
So, pick 2 subnets.
10.1.3.0/24 - VLAN3
10.1.4.0/24 - VLAN4
Ensure both switches have VLAN3 and VLAN4 created on them.
Do not put any VLAN3 or VLAN4 addresses on your switches.
Ensure the switchports that are patched to each other between the 2 switches are all configured to carry VLAN3 Tagged and VLAN4 tagged.
ES1 - give it 10.1.3.1
ES3 - give it 10.1.4.3
Configure ES2 with two virtual NICs, one configured for dot1q in VLAN3 with 10.1.3.2 address, the other configured for dot1q on VLAN4 with 10.1.4.2.
Configure ES4 with two virtual NICs, one configured for dot1q in VLAN3 with 10.1.3.4 address, the other configured for dot1q on VLAN4 with 10.1.4.4.
Patch ES2 to a switchport. Configure that switchport for VLAN3 Tagged and VLAN4 Tagged.
Same for ES4.
Patch ES1 to a switchport. Configure that switchport for VLAN3 Untagged.
Patch ES3 to a switchport. Configure that switchport for VLAN4 Untagged.
To test this setup, you should
- ping from ES1 and be able to ping both ES2 ( 10.1.3.2) and ES4 ( 10.1.3.4).
- ping from ES3 and be able to ping both ES2 ( 10.1.4.2) and ES4 ( 10.1.4.4).
Notice that this IP addressing scheme gives you the VLAN ID for the 3rd octet, and the hostname for the 4th octet. Lining up VLAN ID with subnet and creating a pattern for the host numbering should reduce the risk of error and increase the speed of troubleshooting.