The CC license doesn't make any distinctions about where you put stuff.
The question is--you either have a license to use that term, or you don't. And if you do have a license, the license itself specifically disallows any additional restrictions -- "You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material."
The key is that section on patents and trademarks and what it means exactly.
I would love to hear another experienced opinion on it. But I would think that its inclusion pretty much means you can use the text as presented in your own work, but out of caution, I wouldn't replicate that trademarked term beyond the left-in instances.
As I understand it, trademark protections basically hinge on market confusion: is there any risk that the thing you are putting out, and the way you are presenting it, could be mistaken for an official (or someone else's) project? Trade dress and terms all factor into that.
I
believe if you are careful about how you mention the D&D name, it would either be upheld as valid usage or at least not be considered worth combating in court by Hasbro/WotC. In my mind—and again, I am anything but a lawyer—a safe use would be a smallish line on your cover saying that it's "Compatible with the 5th Edition of D&D™ (Dungeons & Dragons™)* " And at the bottom of the back cover something like "Dungeons & Dragons™ and D&D™ are registered trademarks of Wizards of the Coast, LLC and are used without permission purely to indicate compatibility. This is not an official product of WotC, etc. etc. etc." I believe this has always been the case except for the limitations on trademarked names imposed by OGL terms. CC-BY, in theory, allows for this kind of usage.
Now, something worth noting: as far as I could tell from searches, WotC does NOT own a trademark for the genericized term "DnD." As long as you don't try to make it look too much like the official logo or too closely mimic their book/cover design, I would
think (I am still not a lawyer; none of this is legal advice) you'd be safe to use
that term.