Is some sort of mother board battery or other issue happening because we haven't started it up in years? It has been plugged in but not booted up in over a year.
Leaving it plugged in was the proper standby action. Well played. However it means that it is unlikely an internal backup battery (PRAM battery) issue. And not all iMacs have PRAM batteries apparently.
The text that displayed appears to be a kernel panic; those are almost always hardware-related. To start, I would remove all the RAM modules, clean their contacts, and reseat. Sometimes things in slots loosen or corrode with storage and handling.
You can try booting in safe mode in case this is some minor issue with an old, tired hard drive.
How to use safe mode on your Mac - Apple Support
However, a big problem with helping in this text-based format is that there are now five broad families of iMacs going back to 1998 and we cannot see which you have. Proper troubleshooting for one iMac family could be detremental to another famliy. We must know what sub-model you have so we do not give you inappropriate advise, or post things too gernal to help.
A good start is to post a picture. That will at least show us what "family." Beyond that, you'll need to find the serial number. For iMacs with aluminum cases, it is usually on the bottom of the "foot" that supports the computer. Once you find a serial number you have two options to turn it into useful sub-model info that will really help us help you:
1) Enter the serial number into this Apple support site: Check Your Service and Support Coverage - Apple Support
It will return the sub-model as in this example:

In that case the sub-model is "27-inch, Mid 2010)
2) The Apple site may not work for really old models so, if that is the case, this web page does the same function for older Macs:
https://everymac.com/ultimate-mac-lookup/
⚠️ For security reasons, please to NOT post the serial number in open forums, just the sub-model. Thanks.