I have a project where I would like to charge the two included 1.2v nimh batteries inside with a micro-USB cable.
My question is. Could I charge my two 1.2v nimh batteries connected to 3.3v on my ESP8266 with the USB power connected to 5v input on my ESP8266?
Check the ESP8266 specification regarding the 3.3 volt output for max current. How do You intend to control the current and when to stop charging?
You charge NiMh batteries with a current source, a simple resistor is enough. Keep the current below C/10 and you'll be fine. I have some on constant charge at about 5mA or something, means they take a week to fully charge but at they don't get discharged often that's OK.
Are you sure they're NIMH? 1.2V sounds more like a NiCad voltage.
NIMH are also 1.2 volt cells.