Then WHY in heavens name are you using SoftwareSerial? You have 4 hardware serial ports. Connect the ESPxxxx to one of them.
You DID read the page about which pins you could do SoftwareSerial on on the Mega, didn't you? (I didn't think so.)
No I did not read that page. And just googled it and found this:
Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).
are you talking these pins to be used?