Interestingly, I found two definitions of being analytic at infinity that will give me different answers to this simple question. One definition is that $f(z) = z$ is analytic at the infinity iff $f(z) = \frac{1}{z}$ is analytic at $z = 0$, which shows $f(z)$ is not analytic at infinity. Another definition is that $f(z)$ is analytic iff $\frac{df(z)}{dz}$ exists at infinity. Since $\frac{df(z)}{dz} = 1$, so $f(z) = z$ is analytic at infinity.
Also, whether being an entire question requires the function to be analyic at infinity? I don't think it is true because otherwise, Liouville's theorem will show there is no entire function.
These two definitions are incompatible in general — you haven't stumbled on some weird edge case. The first one is stronger than the second; if $\lim_{z \to \infty} f'(z)$ exists and is nonzero, then $|f|$ will be unbounded on any ray as $z \to \infty$, by the mean value theorem. So $f(1/z)$ will be unbounded (and hence not differentiable) near $0$.
In my experience, the first definition is standard, and so the identity function is not considered analytic at $\infty$. I have never seen anyone use the second definition. And as you have correctly guessed, entire functions need not be analytic at $\infty$...