How do I add a view mode to a simple custom entity?
You need a view builder class in the handler section:

 *   handlers = {
 *     "view_builder" = "Drupal\Core\Entity\EntityViewBuilder",


and a field UI route:

 *   field_ui_base_route = "my_entity.settings",


pointing at the config form for the settings of your entity type. If you don't have settings return at least a #markup element:

  public function buildForm(array $form, FormStateInterface $form_state) {
    $form['my_entity_settings']['#markup'] = 'Settings form for My Entity entities. Manage field settings here.';
    return $form;
  }