Changing the specular exponent of Principled BSDF with texture when exporting to Wavefront (.obj)
The roughness of the Principled BSDF controls the specular exponent that is written into the .mtl file.

From the export_obj.py source code:

# XXX Totally empirical conversion, trying to adapt it
#     (from 1.0 - 0.0 Principled BSDF range to 0.0 - 900.0 OBJ specular exponent range)...
spec = (1.0 - mat_wrap.roughness) * 30
spec *= spec
fw('Ns %.6f\n' % spec)




Output for Roughness set to 1.0:

# Blender MTL File: 'None'
# Material Count: 1

newmtl Material
Ns 0.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.0 0.0 0.0
Ni 1.450000
d 1.000000
illum 2




Output for Roughness set to 0.0:

# Blender MTL File: 'None'
# Material Count: 1

newmtl Material
Ns 900.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.0 0.0 0.0
Ni 1.450000
d 1.000000
illum 2