It is very much vendor dependent.
You are assuming that the HSM has a linux or desktop-like kernel and GUI. Nope. The HSM is probably an embedded system running a roll-your-own (proprietary) operating system.
The Utimaco 'CryptoServer' line does not support HTTPS or SSL, but that is an answer to an incorrect question. Does the software (called SecurityServer) implement a secure connection between the host application and the firmware, running on the HSM? Yes. But it isn't over HTTPS (as of 4.20) and it doesn't use TLS. And the encrypted connection is between your application and the firmware on the HSM, not the OS that the HSM is plugged into. Ie, there is no 'man-in-the-middle'.
Does the HSM provide "user space"? No, because the OS on the CryptoServer is an embedded OS and it does not have the concept of a User (as defined by a linux or other desktop OS). If you write custom code (CryptoServers support custom code in C and in Lua), C modules run in kernel space, Lua modules run in a Lua sandbox.
SecurityServer supports CXI (Utimaco proprietary), Java_CXI, JCE, PKCS#11, CSP, CNG, EKM. But not RESTful, which is what an HTTPS connection would be.
So: Ask the vendor.
(note: Yes, I work for Utimaco).