Card-edge connectors will be far too big for that application, then! Mezzanine connectors are fundamentally small, fragile connectors intended for high-speed signals. I wouldn’t use those, either.
You have many options, but there is likely little that would be cheaper than using bog-standard 0.1” (2.54mm) headers. I would probably put a through-hole male header on the main PCB and a surface-mount vertical header on the back of the display PCB.
If the both PCBs are firmly and accurately held by the enclosure, and you wanted to go super fancy, you could even use pogo pins or other spring contacts on the main PCB to contact pads on the display PCB.
P.S. The ESP8266 is super ancient. Why not use the modern successor, the ESP32-C3?