Don't use the String class. Use C-strings (null terminated character arrays).
Use the methods of the serial input basics tutorial to receive the serial data into a C-string (string). The tutorial shows reliable and robust ways to receive and parse serial data.
To write to EEPROM use the put() function. To read the data back use the get() function.