Query involving TVF very slow on SQL Server 2008
Before SQL Server 2012 SP1, the permissions needed by the linked server login to read remote statistics were:


  In order to view the statistics object, the user must own the table or the user must be a member of the sysadmin fixed server role, the db_owner fixed database role, or the db_ddladmin fixed database role.


From SQL Server 2012 SP1 onwards, the login only needs SELECT permission:


  
  Users must have permissions on all columns in the statistics object
  Users must have permission on all columns in a filter condition (if one exists)
  The table cannot have a row-level security policy.
  


More information in Distributed Queries – Remote Login Permissions and Execution Plans

Without access to statistical information, the optimizer makes a guess at the number of rows returned by the TVF (one row) and chooses nested loops on that basis.

If you cannot make the linked server login a member of one of the groups mentioned, the best workaround for the specific query in the question might be an OPTION (HASH JOIN) hint, or to read all the data from the remote server into a #temporary table.