Solution by OronSH.
We claim f(x)=0 and f(x)=x are the solutions, which work.
Assume f is not constantly zero, so f(x)=0 for some x. Then varying y gives f surjective, and plugging in for y gives f injective.
Fix some x such that f(x)=0. Pick y by surjectivity such that f(x2)+f(x)f(y)=x2, which gives y=0, so f(x2)+f(x)f(0)=x2 whenever f(x)=0.
Since at most one value goes to zero, there exists nonzero x such that f(x),f(−x) are both nonzero. Then f(x2)+f(x)f(0)=f(x2)+f(−x)f(0)=x2, but f(x)=f(−x), hence f(0)=0.
Hence for all nonzero x we have f(x)=0 by injectivity, hence f(x2)=x2.
Now fix a negative k and let f(y)=k. Choose x positive with x>−k. Then f(f(x2)+f(x)f(y))=f(x2+xk)=x2+xk=f(x2)+yf(x)=x2+xy, hence k=y and thus f(k)=k for all negatives.
Together we get f(x)=x for all x, as desired.