If you followed the directions that I gave, you did not make a bootable flash drive. You made a flash drive that has a data file (the .DMG disk image containing the El Capitan installer) on it. Even if you restored the disk image (instead of merely copying the .DMG file), you would not have a bootable drive. This particular .DMG is not an image of a bootable drive.
You need to have an operating system running on the old iMac to be able to open (mount) that disk image and to run the installer. This is where optical recovery discs come in. Like my old iMac (27-inch, Late 2009), your iMac (24-inch, Early 2009) predates Internet Recovery, and would have come with optical recovery discs - discs that you would not want to lose under any circumstances.
If you have misplaced those discs, but have a bootable clone backup, you could boot from it.