It's the Prometheus punishment.
These kind of questions tend to be up to the DM to determine, depending on the story they want to tell, but to me, this application of the spell appears to be based on the Greek myth of Prometheus, who was chained to a rock while eagles tore out his liver every morning (which regenerated by nightfall, because, y'know, god). Or if you prefer, Loki, chained in a cave while a huge snake drips venom into his eyes.
Being restrained by chains and unable to move or be moved would imply to me that the target can still wiggle fingers, talk, and so onmaybe even thrash around a bit, but is held in position by the chains, so they can't really scratch their face, write, or do exercises (other than isometric). Nothing in the description seems to stop the target from eating, but they'd need somebody to bring them the food and put it in their mouth.
The spell doesn't say the target stops needing sleep, so presumably they do pass out from time to time, and it doesn't say the target can't take damage or die, so if they were somehow prevented from sleeping, I suppose levels of exhaustion would accumulate until they did in fact die.
It doesn't say they can't cast spells, but I would probably say they can't cast any spell with a somatic or material component since their hands are bound, which limits them pretty heavily.
Basically if you can see somebody doing something while chained tightly to a wall, it's probably within the realm of what they can do while under this spell's effect.