There is no 'downgrade', only a fresh install. Yes, you will run on trial version, and then expire. Not sure you can even buy a esxi 6.5 license even if you wanted to.
Unfortunately it looks like you will be in a completely unsupported scenario (esxi 6.5 went end of support years ago), as is CUCM 10.5.
Hope this isn't for production.
You need to upgrade CUCM, and run it on the updated and supported hardware/hypervisor.
Kirk...