Install OS on iMac with blank hard drive
Is is possible to get a late 2010 iMac with a blank/new hard drive up and running with the latest OS and XCode?

Yes.  The late 2010 iMac (both 21&quot; and 27&quot; models) had the capability of having their EFI upgraded to support Internet Recovery.
There are a few caveats here:

Internet Recovery (hold ⇧Shift⌥Option⌘CommandR) will install the last version that was installed on that Mac.  If it's pre High Sirra, you'll have to install that version then upgrade.

The EFI should have been patched via normal system upgrades.  It's unlikely that the iMac wouldn't have been upgraded in the last 8 years, but if it hasn't, you need to install Lion (10.7.3) and then install the patch (download here)

You need a &quot;decent&quot; Internet connection.  You'll be downloading not just the installer, but the entire OS.  If your connection is flaky, it's likely to fail.


Options

Use Internet Recovery as detailed above
Take to an Apple Store and they will assist with the download and install
Have a friend, colleague, or family member create a USB installer for you.

Finally...
Once you have your system installed (even before you install XCode), do a Time Machine backup so that you have an image of your system in it's pristine state in case you have to install macOS on a blank drive again.