what do you mean by bare metal in this scenario?
With the ESP32 it seems that this is not something reasonable to do, as most things require extensive setup that is implemented in the framework.
The language runtime is the "OS", and you talk directly to io ports and memory addresses.