To be more specific, has the IP stack been designed with the idea of multiple interfaces being simultaneously active without the possibility of one accidentally overwriting the memory used by the other?
For example running an ESP32 with WiFi and a LAN8270A Ethernet connection at the same time, or a Mega with two Wiznet adaptors.
This library is designed to work with the Arduino Ethernet Shield, Arduino Ethernet Shield 2, Leonardo Ethernet, and any other W5100/W5200/W5500-based devices. The library allows an Arduino board to connect to the Internet. The board can serve as either a server accepting incoming connections or a client making outgoing ones. The library supports up to eight (W5100 and boards with <= 2 kB SRAM are limited to four) concurrent connections (incoming, outgoing, or a combination).
EDIT - sorry that's not answering your question about multiple interfaces at the same time.
I've never tried - I would think it works (I've heard of ESP32 board with Ethernet adaptors with both stacks active) within the memory constraints as buffers get allocated. So you might be challenged quickly on a MEGA
for Ethernet shield with the Ethernet library, the TCP/IP stack is in the W5500 so no multiple interfaces.
the esp32 uses LwIP TCP/IP stack running in the MCU so it supports multiple interfaces WiFi, SoftAP, Ethernet. even the W5500 in MAC level mode is supported in 3.0.0
but if you have two modules, then you have 2 "TCP/IP stack", one in each module. I think the question was - does the Ethernet library use class variables that would end up being shared if you happen to have 2 instances.