SMB 2 is a little more than "just a reskin" of Doki Doki Panic, it has some slight modifications to game mechanics and is also significantly easier. In Doki Doki Panic you need to complete each level with every character to advance, whereas with SMB2 you can advance after clearing a level with any character. Extremely few people who played the game knew at the time that SMB2 was a derivative of an entirely different game, or that it was not the same game as was released in Japan as SMB2.
Also, ironically enough Doki Doki Panic originated as a prototype of a possible sequel to Super Mario Bros, based around the core mechanic of falling. It was reworked to be more like SMB in terms of the core mechanics and then spun off into its own game with different assets. Which helps explains why transforming it into a mario game even further down the road was actually possible and wasn't such a crazy idea.
However, back then the world media was far less globally integrated, and too video game media was vastly less well developed than today. Indeed, a lot of the "media" that people relied on for gaming news was nothing more than advertising, as in the case of Nintendo Power magazine. Which, incidentally, features the American Super Mario Bros. 2 in the first issue.
Five years later (in '93) Nintendo of America released "Super Mario All-Stars" for the SNES which included a remake of the game that had been released in Japan as SMB2 now titled "Super Mario Bros.: The Lost Levels". Which certainly clued people in that the US version of SMB2 was "different" but even then it wasn't widely appreciated that it was built on top of a different game. There aren't exactly annual polls of American video game enthusiasts asking them whether they knew that SMB2 was based on "Doki Doki Panic" so it's not exactly easy to say when it became a more widely known fact.
Almost certainly, it was not until the NES/SNES gaming scene had passed out of currency and then back into currency with the rise of "retrogaming" in the late '90s and early 2000s before large numbers of people started significantly caring about the in depth development history and production trivia of games. Assisted, of course, by the rise in internet communities (usenet newsgroups, web forums, etc.), video game magazines, video game review sites, and informational sites (game FAQs / walkthroughs, wikipedia, etc.) Before the late '90s video game enthusiasts were simply on a different level. Earlier gamers may have consumed a lot of media (movies, television shows, magazines) but a lot of this was basically promotional material, it wasn't until the rise of the internet that video game fandom transformed into its more modern form. One that is almost obsessive in its pursuit of trivia and minutiae around games: cataloging game bugs and quirks, speed run details, designers, composers, etc.