Hi,
It all depends on the input threshod levels for HIGH and LOW at the according pins. And the according output levels.
I don´t like reading the datasheets for you . So please do on your own.
Look in the electrical specification section for V_OL, V_OH, V_IL, VIH ... for normal/your operation condtions.
Report them to us. (This makes 8 values in total for 2 microcontrollers)
*****
A sketch of the schematic would be helpful ... to show what you want to do.
*****
Also you don´t give any idea of
* the interface you want to use
* one direction / bidirectional data flow
* data rate
* distance between ESP and AruinoNano
* and so on..
Klaus