Animals have evolved systems for sensing and experiencing pain, noxious/harmful stimuli, impinging on the individual. There is a physical basis for pain. Form many organisms this system includes neural tissues processing up to and down from the central nervous centers. Humans, for instance, are known to subjectively experience pain as well as demonstrate signs they are sensing and experiencing physical pain given the activities carried out by other systems in concert with sensory and other neural processing of pain.
One of my Dissertation committee members back at FSU was Dr. Dan Kenshalo who specialized in tactile sense theory including pain. A student and associate there, Alan Chatt, isolated EEG evidence of pain response at the sensory cortex in Macquacs in about 1975. Also Dr. Kenshalo was editor of a publication in which the following article by Dr. Melzack, co author of Pain Gate theory with Dr. Wall.
https://www.researchgate.net/public...es_proceedings_Springfield_Illinois_Charles_C
Later I got into pilot and operator workload work where a scale Cooper - Harper Scale was developed to recruit estimates of subjective workload from trained individuals. this scale has now been adapted for Pain at many institutions across the world for gathering information on subjective pain experience.
View attachment 19408 View attachment 19409
So, yes there is both theory and method for physical basis and subjective basis for pain experience in humans and some other animals. Pain stimuli can both be noxious/tissue damaging and mechanical physical energy applied to tissue which have been measured by some (not included). My favorite test as a student was to apply a hot soldering iron to the back of a Limulus Crab and witness it's pain response in the form of driving it's tail down lifting its body up from a surface.
Pain works, in many ways, similarly to sensation of hot and cold which are known to lead to physical reactions, sweating and shivering, in proportion to the difference is surface temperature from core temperature.
Since there are many things referred to as painful I limit my assertions to only those forms of pain induced by thermal or pressure to the skin by direct stimulation. So radiation, joint, temperature induced, and other indirect or radiated forms of stimuli are not as yet fully understood with respect to changes in subjected tissue from whence pain signals arise as chemical effects.