Referenced feature layers published to Portal for ArcGIS with projections other than WGS 1984 Web Mercator (Auxiliary Sphere) do not have the legend printed together, but the map image layers include the legend inconsistently.
Change projection for the feature classes before publishing to the default WGS 1984 Web Mercator (Auxiliary Sphere).
Publish the service as Hosted.
Remove the Print Service URL from the Utility Services tab in Portal for ArcGIS > Organization > Settings > Utilities to use the default print service from Portal (does not have customizable templates, only Map Only or With Legend).