What is the USB drive you used to try to boot the iMacs?
You can try to boot the iMacs using Command + Option + R to see if you can boot to the macOS 10.13 High Sierra online installer (assuming those iMacs at one time had macOS 10.12.4+ installed at some point in the past). Unfortunately some Macs may only boot to the older online installer for the OS which originally shipped with the Mac from the factory (or oldest one still available) which would be macOS 10.7 Lion.
If you have access to another Mac from Late-2009 to Mid-2018 booting to any version of macOS 10.11+, then you use the instructions in the following Apple article to create a bootable macOS 10.13 High Sierra USB installer:
Create a bootable installer for macOS - Apple Support
Or if you have access to a Mac from 2007 to 2015, then you can create a bootable macOS 10.11 El Capitan USB installer. This way you can start with El Capitan, then afterwards upgrade to High Sierra.
Otherwise you will need to find the original gray system Restoration DVD for your exact model iMac to restore the system to OS X 10.6.1 or 10.6.2. Or if you can find a retail version of the OS X 10.6.3 Snow Leopard Upgrade DVD, then that will get an OS onto the iMac so you can then upgrade to macOS 10.11 after which you can upgrade to macOS 10.13. You will not be able to use the original OS X 10.6 Snow Leopard Upgrade DVD since it won't have the necessary system drivers because that version was released prior to the manufacturing of your iMacs.