Change form title for a custom entity
The answer comes from here: https://www.drupal.org/node/2187643.

Note: change "module" in the below code to the name of your module.

The first step is to register an event subscriber service. In module.services.yml:

services:
  module.route_subscriber:
    class: Drupal\module\Routing\RouteSubscriber
    tags:
      - { name: event_subscriber }


Next, create your class RouteSubscriber and extend RouteSubscriberBase:

  namespace Drupal\module\Routing;

  use Drupal\Core\Routing\RouteSubscriberBase;
  use Symfony\Component\Routing\RouteCollection;

  /**
   * Subscribe to the Route to change page titles.
   */
  class RouteSubscriber extends RouteSubscriberBase {

    private function alterRoutes(RouteCollection $collection) {
      if ($route = $collection-&gt;get('entity.project_entity.add_form')) {
        // set the title (or override '_title_callback' below)
        $route-&gt;setDefault('_title', 'Create Project Request');
        // unset the _title_callback; alternatively you could override it here
        $route-&gt;setDefault('_title_callback', '');
      }
    }
  }


Note that you receive a RouteCollection in alterRoutes and then using the $collection-get() will return an instance of Route.  The documentation for Route can be found here: http://api.symfony.com/2.7/Symfony/Component/Routing/Route.html

If you're having trouble figuring out what your routes are, the excellent drupal console drupal route:debug tool will help you.