That is a Kernel Panic. Usually this indicates a hardware problem or an issue with a third party driver.
See if you can boot the Apple Diagnostics.
Whenever you acquire a pre-owned computer you should always perform a clean install of the OS by first erasing the whole physical drive. A 2011 iMac can run macOS 10.13 High Sierra. If this iMac had macOS 10.12.6+ installed at some point, then you may be able to access Internet Recovery Mode using Command + Option + R to access the latest compatible online macOS installer. Apple makes it harder to erase the whole physical drive with macOS 10.13+ since Apple hides the physical drive from view in Disk Utility. Here is an article showing how to select the physical drive to erase (you can use Internet Recovery Mode as I mentioned for these instructions or a USB installer):
https://support.apple.com/guide/disk-utility/erase-and-reformat-a-storage-device-dskutl14079/mac
If you have access to another compatible Mac you can create a bootable macOS USB installer (10.11 or 10.13). Here is an Apple article with instructions to create a bootable macOS USB installer:
https://support.apple.com/en-us/HT201372