(Note: this answer only concerns the asymptotic regimes of these functions, not a precise characterization of the exact functions that are possible.)
It is known that, for any regular language, your function either grows exponentially, or grows polynomially. In the latter case, the language is called sparse (or polynomially bounded), and there is a characterization of the shape of the DFAs of polynomially bounded DFAs: essentially, it consists of a DAG of connected components and the transitions within each connected component, if any, must form a single cycle.
The degree of the polynomial intuitively corresponds to the maximal number of connected components with a cycle that can be seen on a path on the DAG of connected components.
If the function is O(1) then this is called a slender language and if the function is upper bounded by 1 (at most one word per length) then this is called a thin language.
For more information, see Chapter XII, Section 4.2, of Jean-Eric Pin's "Mathematical Foundations of Automata Theory"; or Andrew Szilard, Sheng Yu, Kaizhong Zhang, and Jeffrey Shallit. "Characterizing regular languages with polynomial densities". In MFCS, 1992. (unfortunately not available in open access)