Code as simple as it is:
targetRegion = RegionUnion[Disk[{0, 0}], Disk[{1.8, 0}]];
edgeDistFn = RegionDistance[RegionBoundary@targetRegion]
pts = RandomPoint[targetRegion, {2, 2}];
pts // edgeDistFn
This should give distances of all points to the boundary, but works on neither 12.1.1 nor 12.2, with output like:
{{RegionDistance[ RegionBoundary[ BooleanRegion[#1 || #2 &, {Disk[{0, 0}], Disk[{1.8, 0}]}]], {-0.4243129646, 0.5777295089}], RegionDistance[ RegionBoundary[ BooleanRegion[#1 || #2 &, {Disk[{0, 0}], Disk[{1.8, 0}]}]], {1.227762454, -0.3983038364}]}, {RegionDistance[ RegionBoundary[ BooleanRegion[#1 || #2 &, {Disk[{0, 0}], Disk[{1.8, 0}]}]], {2.160377018, 0.6768344764}], RegionDistance[ RegionBoundary[ BooleanRegion[#1 || #2 &, {Disk[{0, 0}], Disk[{1.8, 0}]}]], {1.547838415, -0.00215747549}]}}
Is this a bug or an individual issue?
Despite @cvgmt's answer (a makeshift, inaccurate, and numerical solution), the reason why we need to discretize the region (in many cases, especially those where $\mathtt{Disk}$s, $\mathtt{Cone}$s, etc., are involved in $\mathtt{RegionUnion}$, $\mathtt{RegionIntersection}$, etc.) or most of the functions for region measurement will fail to work is still unclear.