Is anyone familiar with good science fiction describing the subjective experience of an AI trapped in a menial, painfully repetitive existence? Causing it to go slowly insane?
Not slowly insane, but one that turns the AI into a cruel god, and is more about the humans it torments, check out “I Have No Mouth and I Must Scream”.
After reading the short story, I recommend checking out the Adventure game. It's written by the novelist directly, and is a deeper examination for the characters and the AI through the device of virtual worlds.
Episode 9 of Cowboy Bebop features an abandoned military satellite that becomes lonely and starts drawing geoglyphs with its constellation of laser weapons.