This is an interesting question, relating to the evolutionary role of pain going beyond protection of the individual survival and immediate reproduction (or that of kin), but affecting the group as a whole. As you said, debilitating pain (i.e., pain that prevents individuals to function normally) for a solitary species may also have different moral implications than for a social species even if the unpleasantness of the pain experience is the same.
My impression is that it would be difficult to determine differences in pain aversiveness among species with different degrees of sociality given the confounders present. For example, there might be differences in hedonic and cognitive capacity between social and non-social species (see eg here), hence differences in aversiveness to pain for reasons other than the context of the painful experience.
Thanks! I will revise the post to make sure it is clearer!