References on pain fibers say impulses move along axons to the CNS, but I thought that by definition axons carry impulses away from the cell body.
They are considered axons. Pseudounipolar cells have a bit of an odd morphology.
The reason you consider the entire length an axon is because it all grows from a single process from the soma which then branches. Terminology is just terminology, so "rules" are often made to be broken in biology: yes, an axon typically carries information away from the soma, but that's not the case here for neurons where the information sort of bypasses the soma.
Besides the developmental origin from a single process, the initiation site for an action potential is out in the distal end of the axon, rather than at an axon hillock connected to the soma, and if you had a section of axon on either side of the soma it wouldn't be apparent which end you were looking at.
Tandrup, T. (1995). Are the neurons in the dorsal root ganglion pseudounipolar? A comparison of the number of neurons and number of myelinated and unmyelinated fibres in the dorsal root. Journal of Comparative Neurology, 357(3), 341-347.