Whether the fish is in pain is a question of the degree and direction of the bend. If you are not separating this fish from females, please humanely euthanize it.
We have a bent back fry who is now eight months old. Our daughter is madly in love with her. Her bend is mild and vertical. She eats very well. She rests a lot but can swim when she wants to. Is she in pain? Fish experience pain very differently than humans, so... Maybe?
If the bend is horizontal, there is enough internal deformity that the fish's organs will not function properly.