Is there an explanation of why some colors seem to move forward/backward on a 2D plane?
Lenses, both in glasses and in the eye, refract light of different wavelengths by different amounts. This is the well known prism effect. Opticians do their best to correct for it but it is inevitable to some degree. The technical term for this phenomenon is chromatic aberration.

In optics, chromatic aberration (CA, also called achromatism, chromatic distortion, and spherochromatism) is a type of distortion in which there is a failure of a lens to focus all colors to the same convergence point.[1] It occurs because lenses have different refractive indices for different wavelengths of light (the dispersion of the lens). The refractive index of transparent materials decreases with increasing wavelength in degrees unique to each.
Chromatic aberration manifests itself as &quot;fringes&quot; of color along boundaries that separate dark and bright parts of the image, because each color in the optical spectrum cannot be focused at a single common point. Since the focal length f of a lens is dependent on the refractive index n, different wavelengths of light will be focused on different positions.
Wikipedia

This effect alone can, I believe, give rise to depth perception anomalies.
Note: The above explanation refers primarily to a single lens.  I'll hazard a guess that our binocular vision combined with chromatic aberration makes even more of a difference in depth perception.