When booting into Recovery Mode, you should do so using Command + Option + R as that should prevent the need to authenticate with the AppleID to confirm a previous App Store "purchase" of the OS. You would also want to erase the whole physical internal drive as well as GUID partition and MacOS Extended (Journaled).
If this is a Late-2009 or newer iMac, then using Command + Option + R will access Internet Recovery Mode....hopefully for macOS 10.13+ which may prove easier to install as well, but you may need to erase the physical drive as GUID partition and APFS (top option) instead. This assumes that macOS 10.12.4+ was previously installed on the Mac sometime in the past.
If you have access to another Mac from 2007 to 2015, then you could use the other Mac to create a bootable macOS 10.11 El Capitan USB installer using the instructions in this Apple article:
Create a bootable installer for macOS - Apple Support
If you have a Late-2009 or newer iMac, then you would have even more options for creating a bootable macOS USB installer as it would allow for an even larger range of compatible Macs.
If your iMac is an Early-2009 or earlier model, then you could try to find/purchase an OS X 10.6 Snow Leopard retail upgrade DVD to get started. This is not an option for the Mid-2009 or later iMacs.
Another option would be to forego using macOS and instead install Linux Mint on this iMac. This would give you a current non-Apple OS which has access to popular third party web browsers such as Firefox, Chrome, Vivaldi, and others. macOS 10.11 is very old and it is getting more difficult to find third party browsers which still support El Capitan in order to access the Internet. It does require you to learn a new OS. Linux is not for everyone, but it is a good way to extend the useful life of older computers. You can select the "Live" mode from the Linux Mint installer to check out what it is like before installing it, but keep in mind this will perform extremely slow while booted from the Linux Mint USB installer.
My concern for such an old iMac is the condition of the internal hard drive. More than likely the internal hard drive is either worn out or even failing. You can try running the Apple Diagnostics to see if any hardware issues are detected, but unfortunately the diagnostics rarely detect failures although it never hurts to check. There are other ways of checking the health of the hard drive, but they either involve first installing & booting macOS from an external drive, or by booting a special Linux USB stick which has a utility for that purpose.