When I first saw that Captain Marvel and Shazam were coming out within a month of each other, I nearly laughed out loud. The two characters have a strange, intertwined, copyright-entrenched past that has been buried by time. Shazam was actually the original Captain Marvel. Though he is now a DC character, he didn’t start off that way. In fact, Shazam has been around since 1940, when he first appeared in Whiz Comics #2, published by Fawcett Comics. Throughout the decade, he was actually the most popular comics character of the 1940s based on book sales, beating out even Superman. He was also the first comic book superhero to appear in a film (technically a serial), entitled Adventures of Captain Marvel (1941). Apparently comic book superhero movies are about as old as the comic books themselves. Eventually, though, DC Comics (who was publishing Superman) sued Fawcett Comics for “copying Superman,” and halted publication of stories with the character in 1953.
This led to the name “Captain Marvel” being released of all trademark and copyright restrictions, so things began stewing in another popular comic book company - M.F. Enterprises. You thought it would be Marvel to pick up the character immediately? Nope! In 1966, M.F. Enterprises published a short-lived Captain Marvel series. However, Marvel convinced them to stop publishing it, because it carried their company name. Thus, once the name was fully cleansed, Marvel created a new character, also named Captain Marvel (I suppose copyright and creativity don’t go hand-in-hand), in 1973. This led to a long line of characters carrying the name, none of which were all that popular, until Carol Danvers (the current Captain Marvel) came into the picture…after a long time.
Carol Danvers as a character has been around since 1968. She debuted in Marvel Super-heroes #13, as an officer in the Air Force with no powers whatsoever. Later, she gets caught in an explosion of a Kree device after trying to get close to the original Captain Marvel (long story, he’s an alien of the Kree race). The explosion apparently allowed her to obtain Captain Marvel’s characters, as explained when she resurfaced in 1977 in her own storyline. She was then dubbed “Ms. Marvel,” just in case you couldn’t tell she was a woman. She was a fairly popular character, and eventually, she took up the mantle of Captain Marvel in 2012, and Kamala Khan became the new Ms. Marvel.
Meanwhile, DC bought the rights to the original Captain Marvel/Shazam in 1972, and began publishing books with the character again. However, since Marvel had the rights to the name Captain Marvel, DC branded and marketed the character using the trademark Shazam instead, referring to the word Billy Batson shouted to gain his powers and shift into adult form. Consequently, this led many to believe "Shazam" was the character's name. DC later officially renamed the character "Shazam" in 2011, when it decided to reboot all its characters. That’s why the new movie is called Shazam, and the name “Captain Marvel” isn’t mentioned once.
So, there you have it. Two movies that have seemingly no connection to each other apparently have a huge connection, and a long history mediated by copyright.