#JavaScript (ES8), 43 41 39 bytes
n=>`f=_=>"".padEnd(${n}*(88+f).length)`
##Test it
The output of the generated function is a string of spaces which are replaced with *
s in this Snippet.
g=
n=>`f=_=>"".padEnd(${n}*(88+f).length)`
o.innerText=(h=n=>`Function: ${x=g(n)}\nLength: ${x.length}\nOutput: "${x=eval(x)().replace(/./g,"*")}"\nLength: `+x.length)(i.value=10);oninput=_=>o.innerText=h(+i.value)
<input id=i type=number><pre id=o>