Can someone explain the relation between the choice of DNS servers and "DNS-over-TLS server list" in WAN settings? Do both have to be specified? For example, if I choose Quad9 DNS servers, what should I specify in DNS-over-TLS server list, if anything? How it all works if I specify different servers?
Whatever you specify in DNS-over-TLS overrides the WAN DNS servers. WAN DNS servers will be used by the router only and before DNS-over-TLS (Stubby) starts working. You can use Quad9 servers in both if you want to or leave the WAN DNS on ISP assigned DNS and specify whatever you prefer in DNS-over-TLS.
Double check what DNS your devices are using after here:
The DNS Leak Test is a tool used to determine which DNS servers your browser is using to resolve domain names. This test attempts to resolve 50 randomly generated domain names, of which 25 are IPv4-only and 25 are IPv6-only.
browserleaks.com
Quad9 may show as WoodyNet servers. I can recommend CleanBrowsing as well, it has free filters here:
Cloudflare Security is 1.1.1.2 and 1.0.0.2
Cloudflare Family is 1.1.1.3 and 1.0.0.3
I used OpenDNS for a while but had problems. Cloudflare Security works well for me.