I shall take $\mathbb{N}$ starting with $1$ so that $0\notin\mathbb{N}.$
If you want a surjective function with the preimage to have infinite cardinality for all $n\in\mathbb{N}$, you could try the following:
$f:\mathbb{N}\to \mathbb{N}$ such that $f$ sends perfect squares to $1$ and any non-squares to the smartest divisor (that is not $1$).
Explicitly, let $m\in\mathbb{N}$ and by unique factorisation to primes, we can write it as $p_1^{l_1}\cdots p_k^{l_k}$. WLOG, rearrange so that $p_1<p_2<\cdots<p_k. $
If $k=1$ and $l_1=1$ then $f(m)=1$. If $k=1$ and $l_1> 1$ then $f(m)=p_1$. If $k>1$ then $f(m)=p_1l_1$. (And $f(1)=1$).
It is surjective:
First $f(1)=1$ so $1$ is in the image. For $n\neq1$ and $n$ a composite number, we could write $n=pq$ and $p$ is prime. Then we can map $p^q\alpha$ for some $\alpha >p$ and $\alpha$ is prime to $p$. For instace, let's consider $16=2\times 8$, then $2^8\times 3$ will be mapped to $16$. $f$ is thus surjective. For $n\neq1$ and prime then any of its powers would be mapped to this prime. So surjective!
$f^{-1}(n)$ has infinite cardinality:
$f^{-1}(1)$ has infinite cardinality since there are infinitely many primes. So let us consider $n>1$. Again, say $n=pq$, $p$ prime. Notice since there are infinitely many primes, there are infinitely many choices of $\alpha$ where $\alpha$ is given as above. Lastly, if $n>1$ and prime then any of its powers work. Thus it has infinite cardinality as required.