Didn’t get it where 2M and 10M are and hence this cap is, as I don’t know your V_batt, Your source appears to be a 1S LiPo, then you might have R1=2M and R2=10M, but however the cap must be wired this way:

this can get a noisy measurement (0,33 µA ground current @4V), use good oversampling, averaging…
In the ESP datasheet they don’t state the input impedance of the ADC inputs: some people apply the input leakage (5nA) of an EPS’s GPIO pin also to the ADC in, others claim “in the range 1M”. This has implications on your divider as it might deliver too few current for the ADCin for even 10bit resolution and veeery slow sampling rate - it must be reviewed.
Time to have another GPIO pin controlling a BJT or FET to power a divider w/ more reasonable resistance values?! ;) Then you have the divider only powered when V_batt needs to be measured, and you can measure faster events in voltage changes (for power analysis of e.g. different “up” states).