The second column of #Pansamantala
is EndDate, which I presume is a date type. In your UNION ALL, you're placing the string 'Grand Total' into the second column, which is not a valid date/time string.
To resolve this, either remove 'Grand Total' in the second half of your UNION ALL:
SELECT '''','''','+@ToTheLeft +', isnull(SUM([Grand Total]),0)
FROM #Pansamantala
or CAST the date columns in the first half of your UNION ALL to strings:
SELECT CAST(StartDate as varchar), CAST(EndDate as varchar), SizeName, Quantity
FROM #Pansamantala