Clearly, $f(z)=z^2e^z$ is one such function. Suppose $g$ is another entire function satisfying the given criterion, then $|f/g|=1$ when $z\neq0$. I want to invoke Liouville's theorem and conclude all such functions are given by $f(z)e^{i\theta}$ for any fixed real number $\theta$. Since $f$ and $g$ are entire and nonzero when $z\neq0$, the ratio $f/g$ is analytic in $\mathbb{C}-\{0\}$.
I think I'm on the right track but unsure how to make the above argument precise at $z=0$.