In the comments Sangchul Lee provides a link to the "Dimensional homogeneity" section of the wikipedia page for "Dimensional analysis" which precicely hits the nail on the head.
Only commensurable quantities (physical quantities having the same dimension) may be compared, equated, added, or subtracted...
Thus, dimensional analysis may be used as a sanity check of physical equations: the two sides of any equation must be commensurable or have the same dimensions...
This has the implication that most mathematical functions, particularly the transcendental functions, must have a dimensionless quantity, a pure number, as the argument and must return a dimensionless number as a result.
Basically, this says that we can look at an expression like "$L=5\mathrm{in}+10\mathrm{cm}$" and make sense of it. Even though the mix of units is awkward we know that both terms on the right are units of length and thus commensurable; that isn't to say that either "$L=15\mathrm{in}$" or "$15\mathrm{cm}$" are correct interpretations of that expression... just that everyone should get concordant results if asked to draw a line of length "$L$" on their paper. Conversely, an expression like "$X=5\mathrm{in}+3\mathrm{kg}$" is not commensurable because "Draw a line of length X." is nonsensical due to the impossibility of drawing a line "3kg long"; whilst likewise "Measure out a sample of mass X." is nonsensical due to the impossibility of trying to "weigh out 5in".
Now, to the specific problem at hand: $x^\mathrm{cm}$
You are correct to notice that this can be expanded as a series, and also that the series expansion you get feels nonsensical. (Because it is!)
The reason is because, like in the "$X=5\mathrm{in}+3\mathrm{kg}$" example, that
$$
x^\mathrm{cm} = \sum e^{ln(x)\mathrm{cm}} = 1 + ln(x)\cdot\mathrm{cm}+ \frac{ln(x)^2}{2}\cdot\mathrm{cm}^2 + \frac{ln(x)^3}{6}\cdot\mathrm{cm}^3\dots
$$
has units that are non-commensurable on the right; it is trying to reconcile a length, an area, a volume, and so on... which just cannot be done any more-so than "Draw a line of length $2\mathrm{cm}^3.$" can be done.
This is exactly what that wikipedia sentence "most mathematical functions... must have a dimensionless quantity... as the argument" is about. The only way that a series expansion will be commensurate is if all it's expanded terms are commensurate with one another... which for almost all functions will mean that we need dimensionless ratios in the argument rather than dimensioned units.