I have a ESP-WROOM-02 module with on-board 18650 battery. V+ and GND are exposed on the board.
Can I directly charge the battery using an USB-C connector with the two cables (red and black) directly soldered to the battery poles on the board?
The lithium battery must be charged by a specialized CC/CV control chip. The module in question already has one, namely a TP5400, sitting between the mounted micro-USB connector and the 18650 battery holder. You should use the same USB connector for both programming the MCU and charging the battery.