Maybe some of this could be solved by loading (temporarily before reading the ADC) the VBAT using gpio PC13 which itself is powered by the battery domain, and will maintain state when the mcu is unpowered. But it adds to complexity.
I may be misunderstanding you but loading already happens, because if you set VBATE=1
(and also set channel=18) you connect a resistor divider to Vbat. So if there is nothing connected to Vbat, you will read ~zero. The divider is /2 on 32F417 and /4 on 32F437. I have today found experimentally that Vbat is exactly 3.3V minus the ~0.6V drop on a BAS116 (low leakage diode), which would not be 0.6V if the loading was not there.
That if the RTC is only low-priority/ or a nice-to-have feature, then it would be good if the product design allowed the end-user/distributor a choice as to whether to fit a battery or not. Or perhaps cost/price is a real consideration.
Yes; I have in the passt made the RTC a factory option.
The biggest problem is lousy options for the "battery".
I am using a 0.22F supercap, which is expensive enough, ~$1 IIRC. Unlike
all batteries, it never wears out (batteries generally go short-circuit, thus buggering your product even if powered 24/7) but lasts only a few days. OTOH I have RTC setting from NTP or GPS.
Re batteries, I have used a very rare Sanyo 2016 lithium rechargeable cell, made for a short time in the early 1990s. It would run for probably some months - or a few years using a proper RTC like a DS1302 which draws much less than an STM CPU. But this means the shelf like of your product may be just a few years.
I also used a common lithium 2032 cell, and a quality one of those will run with a 32F4 for a few years. Or 20+ years with a DS1302 - the shelf life of the battery itself, down to 50% capacity.
The other problem with batteries is that the boards need to be handled carefully; a brief short to something will run it down fast.
Hence the supercap was chosen...
IMHO it is a crap design by STM to not incorporate some feature which is guaranteed to indicate an intervening Vbat dip, with a margin like say 0.3V.
I think I may now get what you meant: you want a product which can be sold with a missing battery, with no software changes. Not sure how it could be done simply.