Traditionally RAID is for uptime or speed, this isn't that (actually quite the opposite). If you want to do an extra integrity check one of the popular ways to do it is to use a file system that has checksums, like zfs or btrfs.
Data Hoarder
We are digital librarians. Among us are represented the various reasons to keep data -- legal requirements, competitive requirements, uncertainty of permanence of cloud services, distaste for transmitting your data externally (e.g. government or corporate espionage), cultural and familial archivists, internet collapse preppers, and people who do it themselves so they're sure it's done right. Everyone has their reasons for curating the data they have decided to keep (either forever or For A Damn Long Time (tm) ). Along the way we have sought out like-minded individuals to exchange strategies, war stories, and cautionary tales of failures.
How to configure it so that data is read from both underlying devices and compared, to detect data bitrot and fail in such case?
You don't lol
Is that at all supported?
Not afaik.
Would be good option to have.
If it ain't broke don't fix it. Use ZFS or BTRFS
I believe you can get this if you setup the underlying disks with dm-integrity, though I'm not sure it's really worth it since it's a very manual setup and has lots of potential edge cases and performance issues. Basically when the underlying disks are setup with dm-integrity, each read is verified with a checksum, if the checksum doesn't match, the dm-integrity layer will return a read error and mdadm will log an error and automatically fallback to the secondary mirror. A "scrub" in this case would simply be reading the disk to /dev/null with dd, then checking the mdadm logs for any errors.
Note that it's been a long time since I've messed with this, so it's possible I got the exact details of the setup wrong.
Red Hat made Stratis to layer all this stuff together but I've never tried it.
https://en.wikipedia.org/wiki/Stratis_(configuration_daemon)
Unfortunately, it's not supported in mdadm. As an alternatives, you may look into zfs and btrfs. Also, backups with versioning may help you if bit rot happened to restore a good version of your file.