STM32 starts timing out receiving data UART after reading 1 byte
Chances are you are missing most of the reply because the extensive logging in your receive loop takes so long that it can't catch the next character.  Even if whatever you are sending printf() output to is an order of magnitude faster than the 115200 baud response from the ESP8266, you are generating so many characters of output for each one received that it's most probable you cannot keep up.

During the initial stage when only one response character was being generated for each character sent, you could perhaps get away with it, but once the ESP8266 is free to keep a 115200 baud channel full, you have to be able to keep up with that.

Console output is indeed useful, but you have to account for the time it takes, queue it up for later output, pull incoming characters into a receive queue using a UART ISR, or something like that.