It sounds like the analog video board is failing. I have experienced that problem; unfortunately, it is the most common failure point for those CRT iMacs.
You can test if this is the problem. Open the bottom panel of the iMac. Disconnect the cable going to the internal
chassis that looks like a video cable. Start the Mac with this cable disconnected. It should start normally, even though you will not see any video. Since the video board is bypassed, it will keep running without shutting off, if the problem was the video board.
(If it keeps running, you can shut it down with no video by pressing the power key and Return)