D&D has an implied genre by the default lore attached to its various classes. Yet it is not beholden to that lore, which is why we have things like rules for firearms, even though many players think firearms are inappropriate for D&D. In one sense it does have a genre, which is a very idiosyncratic form of fantasy, and in another sense it has no genre.
The phrase I have used for this implied genre is "pseudo-medieval faux-European Tolkienesque schizotech," perhaps with a side of "social breakdown." It vaguely resembles the High Middle Ages, or rather, the extremely flawed pop-history understanding of the High Middle Ages, which are almost always presented as the Dung Ages. It's vaguely European, both for including things that aren't really Euro at all (like Monks) and for frequently completely excluding things that were entirely Euro (like the racial melting pot of Moorish Spain or the active trade with the Near, Middle, and Far East, or the aforementioned Dung Ages idea that everything is poop-brown all the time.) It usually takes an extremely superficial reading of Tolkien, slapping in a bunch of tropes from his work with no context or reason, just present because Tolkien did them (like the dwarf-vs-elf mutual racism or orcs being evil Just Because.) It's got rampant schizotech because chemistry and firearms technology is incredibly underdeveloped (usually putting things in the early Medieval period, e.g. before 1300 at the absolute latest), but armor and sword technology is extremely advanced (e.g. plate armor is commonplace (e.g. after 1400 at the absolute earliest), alongside a variety of other technological irregularities that never coexisted IRL. And then, as noted, it has a side of "social breakdown," usually enforcing a more recent--and also more dramatic--"fall of Rome" type effect, where there used to be a Roman Empire equivalent very recently, but it fell in a very dramatic fashion in the past couple of centuries and things have gone rapidly downhill since.
Morrus asked a question, and like everyone one in this thread, I gave a brief answer. Don't like my answer? That's okay, yours is just as valid and I'm not demanding that you cite specific evidence for it.
I don't think there is a single correct or objective answer, and I have nothing further to add.
Move along, move along, this isn't the droid you're looking for...
I used to associate it with a quasi-late medieval period no doubt in part because I associated swords, wizards, and fantasy in general with that period. But at some point, probably around 25 years ago, I came to the conclusion that D&D was really its own particular genre.
I think your assessment is correct and not just because we're in agreement that D&D is its own genre. In a way, D&D is like an episode of the Flintstones. Between magic and the way society is set up, it feels awfully modern.