Regardless of living conditions, nearly all farmed animals are destined for pain.
Why? Because they are bred and (often genetically) modified in ways that while profitable for the farmer, almost always causes tremendious pain to their physical and mental wellbeing (or lack thereof).
Broiler chickens, for instance, live their lives in chronic pain because their bodies are so broken. Naturally, these birds shouldn’t exist. They are monstreous products of industry greed, that would never have developed in the wild.