This is not supported by current XSD of system.xml (Magento/Config/etc/system.xsd).
To enable such behavior for all types of fields at once it is possible to extend \Magento\Config\Block\System\Config\Form\Field::render()
(e.g. using plugins) to make it support new type
value of attribute
element:
<field id="token" ...>
<label>Auth Token</label>
<attribute type="disabled">1</attribute>
</field>
At the moment it is possible to specify any value for type
of attribute
element, but only value shared
will be processed, see \Magento\Config\Block\System\Config\Form::_getSharedCssClass()
. Similar processing can be added in a new plugin to disable element if such attribute
is specified.