I don’t know if this helps, but Spiderman had a cartoon in 1967 and the first Superman cartoon was in the early 40s I believe. That might be stretching things though.
OP might not mean the recent films. Marvel and DC have had cartoons (and movies) in production for many decades now. Consider that the Batman Animated Series started in 1992. That was 32 years ago.