Solution by OronSH.
We claim f(x)=x is the only solution.
Denote the assertion P(x,y). Comparing P(x,y) with P(−x,−y) gives f is odd. Hence f(0)=0. Now y=0 gives f(f(x2))=x2.
Take P(x1/3y2/3,x) to get f(f(x2/3y4/3)+f(x4/3y2/3))=x2/3y4/3+x1/3y2/3f(x). By symmetry this equals the same thing with x,y swapped. Hence dividing out by (xy)2/3 gives y2/3+x−1/3f(x)=x2/3+y−1/3f(y), hence x−1/3f(x)−x2/3=c for all x. Thus f(x)=x+cx1/3.
Now let x be positive and very large. If c>0 then f is increasing, and if c<0 then f is decreasing but still positive. In either case f(f(x))=x is impossible. Hence c=0 so f(x)=x as desired.