This is used by Dragon Age: The Veilguard which tries to detect SSD / NVME install disk this way and displays a warning about limiting graphics quality if it thinks it is HDD.
I looked a bit into properly relaying the option based on our udisks2 dbus interfacing. It is sanely possible for a limited subset of cases. There is RotationRate property of org.freedesktop.UDisks2.Drive (inside org.freedesktop.UDisks2.Block) which basically tells that. However, populated Drive object is absent in case the block device is on top of LVM disk. There is a special LVM2 object potentially present and giving some info about LVM2 logical and physical volume although I didn't see a link to the actual valid Drive which would allow to query that info. Also, lvm2 udisks2 module doesn't seem to be always available by default and might need a manual configuration. Also, there are other cases which would probably need a special handling, like MDRaid devices (and maybe encrypted devices, didn't check that).
Yet maybe even handling just RotationRate when available might be potentially useful, that would at least handle the simple cases and, in particular, typical cases of removable drives.