Measure Tool Data from Python
All credit for this answer goes to the discussion here.

The data is stored in the grease pencil annotations:

bpy.data.grease_pencils["Annotations"].layers['RulerData3D']


Specifically, to get a list of all length measurements currently in the scene:

lengths = list((s.points[0].co - s.points[-1].co).length for s in bpy.data.grease_pencils["Annotations"].layers['RulerData3D'].frames[0].strokes)