I searched the WEB but was unable to confirm the information I describe below.
But I did a test and it seems that the problem you are having is a question of allocating flash memory to be used as EEPROM.
I'm gonna explain :
In the test I did, I loaded and ran the code that writes "Hello" to the EEPROM.
Then I loaded and ran the code that reads and prints the EEPROM.
It worked correctly.
Then I modified the code that reads the EEPROM, placing several routines without specific purpose, just to increase the size of the code and thus take up more space in flash memory.
And when running this new version, it really didn't print anything correct, it printed garbage.
What happens is that when writing the string into memory, the ESP allocated a certain area of the flash to the EEPROM.
When I ran the initial reading program, it allocated the same area, and so the string values were there, and it printed correctly. (I know I didn't print it correctly for you).
When running a larger program, the allocation of flash memory to the EEPROM was different, and the values were not at the address of this "new" EEPROM.
Unlike the UNO/Mega/Nano platforms, which have an EEPROM separate from the flash memory and there is no need to allocate flash, the ESP8266 uses flash memory to simulate the EEPROM, but the allocation (It seems, I couldn't confirm),
depends on the size of the loaded program.
If you load code that writes and reads the EEPROM, the allocation is done in setup() and does not change.
But when loading another code, the allocation made again in setup() may be in another location in the ESP's flash memory.
HTH
PS:
Try this code and see that it works well.
#include <ESP8266WiFi.h>
#include <EEPROM.h>
String readString_;
//-----------------------------------------------
void setup() {
Serial.begin(115200);
EEPROM.begin(512);
String myString = "Hello";
EEPROM.put(0, myString + '\0');
EEPROM.commit();
}
//-----------------------------------------------
void loop() {
long blue = 0; //Only for increase space
for (int i = 0; i < 1000; i++){ //Only for increase space
blue = blue + 1000; //Only for increase space
}
EEPROM.get(0, readString_);
Serial.println(readString_);
delay(1000);
}