This is a expected behavior in the way that MATLAB displays the BackgroundColor for editable text objects. To change this, set the 'Enable' property to 'on' before setting STRING’ property as shown below:
fh=figure
t=uicontrol(fh,'Style','edit','BackgroundColor',[0 .7 .7],'Enable','off')
set(t,'Enable','on');
set(t,'String','Hello World');