So why was Prez in Scooby Doo? Are the universes affiliated?
Good question! The characters are affiliated in that both DC Comics and the Hanna-Barbera characters are owned by Warner Bros. Entertainment, and DC currently publishes a Scooby-Doo comic book. But it goes beyond that; Batman and Robin teamed up with Scooby-Doo and the gang in two episodes of the second Scooby-Doo series, The New Scooby-Doo Movies, so they must be part of the same universe. We know Prez lives in the same universe as Batman, because Prez was a guest star in Supergirl (vol. 1) #10, and Supergirl teamed up with Batman in The Brave and the Bold (vol. 1) #147, so Scooby-Doo and Prez must also share a universe. Q.E.D.
However, that doesn't really answer the question.
I would say there are two answers, an in-universe explanation and a production reason. In-universe, it's just a random piece of decoration, but one that serves to make a point about one of the characters. Some background: the poster of Prez appears in the study of H. P. Hatecraft, a professor at the local university who made his name as a writer of horror fiction featuring ancient horrors, such as The Shrieking Madness of Char Gar Gothakon: The Beast That Hath No Name. In this particular episode, "Pawn of Shadows," his job is threatened by his lack of popularity among teen readers, and the president of the university is thinking about replacing him permanently with guest instructor Regina Wentworth, author of the "Dusk" teen vampire romance novels.* Hatecraft asks Mystery Inc. for help in understanding the modern teenager, so Shaggy and Scooby-Doo come to his home to help him out,** where they see the room pictured yesterday. Hatecraft's explanation for the decor is that he's trying to get into the teenage girl mindset. Taken in this context, the Prez poster becomes just one of many examples of how Hatecraft's view of what teenagers like is stuck in the late 60s and early 70s. There are plenty of other bits of set dressing that get the same point across: the posters of "Cassidy" (David, presumably, the reigning teen idol of the early 70s) and a pair who look suspiciously like Donny and Marie Osmond (whose variety show premiered in 1976); a vampire that bears a certain resemblance to Barnabas Collins from Dark Shadows (1966-71); Josie and Alexander from Josie and the Pussycats (1970-72); and another H-B character I recognize as being from the same general era — the guy with the tall hat and the bone in his shirt — but can't place. Since Prez is never named as such, we can view him as a generic late 60s-early 70s teen idol; the turtleneck and floppy hair are distinguishing traits of the species.
But that raises the question of why, if they wanted a generic late 60s-early 70s teen idol, they used any specific character, much less one as obscure as Prez. The only answer to that is, of course, beats me. But I can guess. It seems self-evident that the producers of Scooby-Doo! Mystery Incorporated were trying hard to make a show that is broadly accessible and appealing across a wide range of ages, but I would suggest they were particularly trying to reach the specific breed of adult male geek that embraced My Little Pony: Friendship Is Magic. I don't know any Bronies personally, but I know the type, and I'd be willing to bet most of them share (or at least affect) a lot of interests that this episode makes reference to: H.P. Lovecraft; comic books, old and goofy ones particularly; hating Twilight; old Saturday morning cartons; blacksploitation films; wu xia-style fighting; and scantily clad women. Speaking of those last four, here are a couple of other screenshots from the same episode:
On the right, you see Angel Dynamite and the Obliteratrix during their amazing martial arts fight; when the former manages to capture and unmask the latter, she reveals that part of her plan required her to steal some equipment from Quest Research Laboratory, a flashback to said theft featured the cameo appearance by the cast of Johnny Quest seen at the left. (It may also be worth mentioning that the when the person under the mask first appeared, out of this costume, she was portrayed as a dead ringer for the Spider-Man character Gwen Stacy: white-blond hair, black headband, green-and-black-striped top.)
So why Prez? Because the people the producers were trying to appeal to with this episode, and with the show in general, would recognize him, and perhaps feel excited about having such a weird, obscure character pop up in an unexpected place. Hey, worked for me. The Twilight, Lovecraft, blacksploitation, and martial arts references, not so much. I'm not interested enough in Twilight to hate it, and I don't think it ruined Comic-Con; I've never found Lovecraft all that appealing; blacksploitation films and martial arts do nothing for me. I do admit to a nostalgic appreciation of old Saturday morning cartoons, and I think writing about Prez two days in a row — not to mention my user icon of Superman wearing a top hat and carrying a cane — makes it clear I'm more than a little interested in goofy old comic books. Nor am I opposed to scantily clad women, though I don't feel any particular thrill at seeing an animated one. I guess I'm guess a bad geek, or not quite the right kind. On the other hand, I watched the whole first season, and blogged about it a bunch of times, so I don't suppose the producers care that I'm not precisely who they were aiming for.
— — —
* Subtlety, thy name is Scooby-Doo! Mystery Incorporated.
** On the other hand, asking a character who is permanently portrayed as an late-60s stoner to help you understand modern teens is kind of a subtle joke.