This question asked whether there are functions other than the trigonometric ones whose Maclaurin series contains infinitely many terms, i.e. that never become zero under repeated differentiation. Phrased this way, it is quite evident that the answer is only polynomials have some derivative that is $\equiv0$.
That alone doesn't answer the question, but examples for analytic non-polynomials are readily given by exponentials etc. and even rational functions. Indeed, to me it seems quite intuitive that polynomials are an extremely special class within the analytic functions, in much the same sense that continuous functions are an extremely special class of functions – however, at least that doesn't quite hold up, since cardinality-wise $\mathcal{C}^0$, $\mathcal{C}^\infty$ and the polynomials are all $2^{\aleph_0}$, whereas the set of all real functions has cardinality $\aleph_0^{\aleph_0}$.
Is there still a rigorous sense in which the polynomials are meagre / Lebesgue-zero or something like that, within the set of infinitely-differentiable functions (or even analytic functions)?