Maybe you bumped or dislodged the charging cable when removing the top case. I would remove the top case and try pressing down on the charging cable that goes from the battery to the logic board. Or removing it entirely and putting back in.
There is a ribbon cable in the mini that connects the superdrive. It is really easy to dislodge this when changing the ram. I disloged it a few times myself. Just check the back of the board with the super drive and I'm guessing that the cable just popped out of the socket. Just put it back in and secure using the side clips and you should be ok.
I had the same problem, the backlight would not come on, but this was because of a liquid spill. I found out the mac kept trying to go to "sleep" and was dimming the screen prior to sleeping. I got it mostly working by 1. Putting in a program that prevents the mac from sleeping. 2. Plugging into an external monitor. This somehow bypassed the short and the computer backlight would work and the computer did not sleep anymore. Good luck.
Depends on the model of iMac, the newest 2011 models use a custom harddrive now that will run the fan 100% no matter what you do. On other iMacs there is a temperature sensor. Maybe this sensor was not reattached to the harddrive and is giving a false reading now.