The relevant parameters in the L293D datasheet are VIH and VIL.
Assuming that the VOH of the ESP8266 is greater than the minimum VIH (2.3V) of the L293D and the VOL of the ESP8266 is less than the maximum VIL (1.5V) of the L293D, it will work.
I think that your second schematic will work and you can easily check the output voltages of the ESP8266 with a multimeter.