Eh. Those are two very different situations.
At the time, iron man was a MUCH more important character in marvel than Shazam had EVER been to DC.
Anyone that read Marvel, or passingly kept track, knew ironman.
He was a regular in their flagship team of the AVENGERS (hell, he had their HQ). He played one of the most pivitol rolls in their civil war comics run. He was also a character, that when presented to audiences that DIDN'T know him, looked like a new and interesting character. He wasn't LIKE another stereyotypical super hero they would know. He was also played by a RIDICULOUSLY well known and beloved actor. And the movie clearly had great action sequences in it.
Compare that to Shazam... There are people that read dc comics that don't really even know him, or know much about him. He's a token member of the Justice league, he's NOT being played by a "RDJ" level actor, they're NOT showing great action sequences, and to new viewers, the character idea does NOT look original. It looks like a goofball rip off of Superman, and THAT'S how most folks are gonna think of it, unless they actually bother to see it. It's got a HUGE uphill battle compared to what Ironman had.