I haven't been able to find any clean or built in way to access them. :/
If you need something, my current solution is use a dictionary to build a table out of the settings that maps the associated power of two to the layer name.
Though may want to reverse the key and value, depending on how you want to use it.
var mask_bit_to_name = {}
for i in range(1, 21):
var layer_name = ProjectSettings.get_setting(
str("layer_names/2d_physics/layer_", i))
if(not layer_name): layer_name = str("Layer ", i)
mask_bit_to_name[pow(2, i-1)] = layer_name