Chosen Solution
Will the i9 9900 TDP 65w work with a Mid 2017 21.5 iMac? I currently have a i5 3.4Ghz!
Your systems i5 7500 micro code is based on the Kaby Lake series of chips the i9 9900 is based on Coffee Lake. The micro code needed is not in your system EFI (BIOS). So sadly the answer is no!