Do you have any references to ESP32 running Linux?
On ESP32, its also quite fine to run FreeRTOS, and you can quite reasonably write cross-platform code which runs on both FreeRTOS and Linux, if that's important.
Well, in many use cases it acts as a single use device & does not run Linux or any OS at all.
It controls whatevwhatever hardware, reads some sensors, etc.
Then when needed gets oders from a normal computer over network or BLE via some simple protocol.
Sup. They just dropped some new hotness that does in fact run Linux. https://www.i-programmer.info/news/91-hardware/19197-the-esp...
As the sibling comment shows, the very latest ESP32 model (S31, not S3) can run Linux. But they can only access maybe 64MB of RAM, and most boards for sale will have significantly less.
In reality, though, the use cases where you need Linux and GPIO are very slim. It's overkill, an ESP32 is realistically more than powerful enough, and Linux isn't even good for GPIO.