Is /Users/Shared preserved after reinstalling the OS? Reinstalling* the OS preserves the contents of user homes in /Users but is /Users/Shared also preserved untouched?
Is my data stored in /Users/Shared safe? (I do have backups.)
* via Recovery or standalone installer on top of an existing installation without erasing the disk or partition. Does it make a difference whether it's via Recovery or standalone installer?
If you are updating the OS to a newer version, either a point upgrade or 'major version' (e.g. from Catalina to Big Sur), then yes, files in /Users/Shared are left untouched.
I have lots of files in /Users/Shared and have never had them wiped by an OS upgrade.
I haven't use Recovery on a working system, but suspect the results would be the same. An OS installer does not wipe the disk by itself.