Lately I had to prefill values on an entity form. Somewhat it did not work directly. Here is a working snippet.
$form['title']['widget'][0]['value']['#value'] = 'The default title';
// To prevent editing
$form['title']['#disabled'] = TRUE;
// To hide is as well
$form['title']['#access'] = FALSE;