SSIS Data Source: Embedded Queries, Stored Procedures, or Functions
I would recommend using stored procedures.  As far as issues with the metadata, this can occur when temporary tables are used.  Using the WITH RESULT SETS option to execute the stored procedure will allow you to define the metadata of the columns instead and SSIS can bypass this step.  An example of this follows.  Also note that if any column definitions were to change or if new columns are added, this would need to be updated as well.

You may also run into problems with using parameters with an OLE DB source as in your screenshot.  However this can be overcome by using the "SQL command from variable" option for the Data Access field.  A string variable can be created as an expression that executes the stored procedure using a parameter sent to the package (or project).  An example of this is below.  This example uses the DT_STR function to cast the numeric parameter to a string in order to concatenate it.  This is not necessary for string parameters or course, I only included this in case you use numeric parameters.  The WITH RESULT SETS option can also be used in an expression concatenating it with the parameter following the same method.

WITH RESULT SETS

   EXEC ('dbo.YourSP')
    WITH RESULT SETS
      (
        (
            ColumnA INT,
            ColumnB VARCHAR(250),
            ColumnC DATETIME 
        )
      );


Variable Expression using Parameter

"EXEC dbo.YourSP " +  (DT_STR, 10, 1252)@ @[$Package::YourParameter]


Functions Followup Response:
If you prefer to use functions and they better suite your needs you can go that route. I tend to prefer stored procedures in general as they offer for flexibility (perform DML/DDL, use temp tables, etc.). If you do use functions, I'd recommend using an inline over a multi-statement table valued version. The inline function is essentially treated like a view and will use the proper statistics to create better execution plans, whereas multi-statement functions won't get these benefits.