ESP32 custom pin initialization

How do I do that?

On the Arduinos, the pins are given special meaning, like SPI, I2C, etc. by the chip maker.

IF the ESP allows customizing the SPI, I2C, etc. pins, you should ask on the ESP forum how to do that.