Background:
We define $\omega(r) = \text{number of distinct prime factors of } r$ and $\mu(r) = \text{mobius function of } r$
Conjecture
Then the solution to
$$ f(x) + \sum_{r=2}^\infty \omega(r) (1 -\mu(r)^2 + \mu(r) )f(x^r) = x $$
is:
$$ f(x) = x + \sum_{r=1}^\infty x^{p_r}$$
Where $p_i$ is the $i'th$ prime and this equation is defined in the interval $(-1,1)$ as $f(x)$ is convergent in that interval only.
Method of verification (for finite number of terms)
Substituting $x=0$ in $ f(x) + \sum_{r=2}^\infty \omega(r) (1 -\mu(r)^2 + \mu(r) )f(x^r) = x $:
We get $$f(0) = 0$$
Differentiating $ f(x) + \sum_{r=2}^\infty \omega(r) (1 -\mu(r)^2 + \mu(r) )f(x^r) = x $ and putting $x=0$ we get $$f'(0) = 1$$
We can differentiate $n$ times and substitute $x=0$ and find $f''^n(0) = ?$
Since $\omega(1)=0$, you have $$ \sum_{r=1}^\infty \omega(r) (-1)^{\mu(r)}f(x^r) = \sum_{r=2}^\infty \omega(r) (-1)^{\mu(r)}f(x^r) $$ and so no $x$ term appears at all (i.e., all terms in the expression are of degree $2$ or greater).
Hence, it is not equal to $x$, so your $f$ is not the solution to this functional equation.