Based on Barbie's excellent answer, I suspect we should view the exercise ball exactly for what it is: a ball to exercise on. It might help you train to get a better posture, which is useful for when you sit in a regular chair, but it isn't meant as an alternative for your permanent seating.
In your specific case: pain while sitting is never a good sign, especially since these muscle are very strong and used very often. I therefore suspect that you overdid yourself and should either built it up more gradually or use the ball and chair in an alternating fashion.
Try building it up with 1 hour incremental steps to see how long you can maintain it or alternate in one hour long intervals. If it starts to hurt, be sure to give your muscles rest before trying the ball again. This might mean not using the ball for a day. The pain doesn't have to be completely gone, but you should give your muscles sufficient time to recover.
The idea is to gradually built up the strength required, so while it may be slow, keep in mind you're coming from hunchbacking 8-9 hours a day!
Another option is to slightly change your position, so that while you still need your iliopsoas to remain upright, other muscles take up part of the load. While you might not be maintaining your perfect upright posture, it's probably still better than slacking in a chair.
Here's a small schematic image of what I mean:
By moving more forward and flexing your hip differently, your iliopsoas will be stressed differently and your rectus femoris (part of the quadriceps femoris) can aid you more.