James McAvoy was Professor X (Marvel), and was also in Wanted, the comic book version of which, while not DC, is set in a very DC-like universe (they kill off characters supposed to be Batman and Robin… okay yes I’m reaching here, you guys took all the good ones).
And if we’re counting Josh Brolin in MIB as Marvel and a LEGO Movie voiceover as DC, then Will Arnett qualifies (Agent AA in MIB3, Batman in LEGO).
I propose as a criterion that it be a live-action performance of a character who was established in comic-book form before the film adaptation.
Or just find more obscurities like Ed Asner have done voice work as both J. Jonah Jameson and Perry White.
He also voiced Granny Goodness, but that has less connection to his Lou Grant character.
How about we require that the character be originated in a Marvel or DC property? That would rule out comic book adaptations of Star Wars, Transformers, and the like, but would still allow Agent Coulson.
Just came in to note that in 2018, Nicolas Cage was in feature films as both the voice of Superman (Teen Titans Go! to the Movies) and Spider-Man (Spider-Man Into the Spider-verse).
Just a quick peek shows that other names who’ve now done DC and Marvel films (comic book world, not ancillary properties) include:
Adewale Akinnuoye-Agbaje
Willem Dafoe
Rosario Dawson
Djimon Hounsou
Danny Huston
Jenny Slate
And Cage played Ghost Rider (Marvel) in two live-action movies.
James Marsden played Scott “Cyclops” Summers in the X-men movies (Marvel), and he also played Lois Lane’s fiance in Superman Returns (DC).
Both Karl Urban and Sylvester Stallone played Judge Dredd, who while he isn’t a DC character, has shared stories with Batman. Both have also been in recent MCU movies.