‘On the pan’, American English, appeares to come from ‘panned’ as in ‘panned by the critics’ which means ‘criticised’.
Panned, in turn, comes from the gold-rush, where pans were used to separate ‘good from bad’ - ie to separate gold from rocks and sand.
Thus, the critics separate ‘good from bad’ in their reviews - sometimes ‘panning’ a performance or whatever, - separating wheat from chaff - by criticising it.
Another theory that I quite like is that it comes from the idea of roasting someone - in a pan, or ‘panning them’. The idea of ‘roasting’ someone does exist today in the sense of a long-form critical diatribes made at award ceremonies etc.
I can’t help having a smirkle of a feeling that being ‘panned or roasted’ might originate from a saint, Saint Lawrence, who was martyred by being roasted to death on a griddle, and famously cried out half way through ‘turn me over - for I am done on one side!’
Making him my favourite saint - for anyone who can maintain a sense of humour when being striped up like bacon, can’t be all bad, in my view.
Said comment is also something that a playwright might cry, when being roasted or panned by the critics, don’t you think?
I can’t find any evidence that he is indeed the origin, but he is quite well known.
I had an ancient copy of ‘Foxes book of Martyrs’ a thick tome of onionskin paper, full of the deaths of saints, in which St. Lawrence appeared, illustrated on his griddle, if I remember rightly. You can see him at the link above. Appropriately he is the saint to call on, if one is ‘pained’ by anything. So critics, Eve, or women, might like to know that.
Another theory (of mine, I made it up) is that pan could come from ‘pain’. As in ‘she pained him’. Or ‘it pained him to look at it’. See what you think...