The 2013 is obsolete, according to Apple, so no hardware support of any kind from Apple for that one.
The 2017 would depend on which model 2017 you have.
BUT, your question is not one that I have seen before.
(paraphrased: Does Apple ever provide a full "refurbish" as a service to the owner?)
What would you hope that Apple will do, that would be different than what you could do yourself? Such as testing to verify most of the hardware. (The built-in diagnostics will do this already)
I can suggest that you might clean up and re-apply CPU heatsink compound on both iMacs, which you can do yourself (or you can pay someone to do that for you.)
Finally, the best answer would be to call AppleCare about your specific questions, where you should find out if Apple can provide some type of a factory-level refurbish, or just a good cleanup, or maybe a good "clean-out" of all cooling lanes inside your iMac. The "refurbish" that Apple does is tied into reselling those various Macs that Apple get as returns, and they certainly want to re-sell those Macs, and those refurbished Macs also get full warranty, same as brand-new Apple hardware. Again, that's a service that I have not ever heard of Apple providing to a Mac owner, when that Mac owner is not Apple itself.