Guys, some cardiology programs use the USMLE scores pretty strongly, some use it a little, and some use it NOT AT ALL. By this I mean that some programs don't even request that you send your USMLE scores (and this includes even some higher tier cards programs). I actually thought my USMLE scores were one thing that might help my application, at least at some places, so I sent them to all the programs where I applied. If I HADN'T liked my scores, I would have sent them only to places that required/requested them as part of the application, and I would have applied to more places that didn't require USMLE scores.
In response to the OP's question: yes, I think you sound competitive to get a spot somewhere. As somebody mentioned above, about 79% or so of US grads who apply get in. With average board scores and being from a middle tier IM program, and with a possible dent on your med school transcript, just don't expect to get into UCSF/Harvard/WashU/Duke, etc. and you should be fine. You can still of course try for some dream schools, and I suggest doing so if you like, but just don't apply to more than 3 or 4 of them, and then apply to a lot of middle and lower tier places. Then you get yourself 8-15 interviews and you'll be good to go. The LOR's and the publications (once they are accepted/published) are going to be helpful.
I am not 100% sure, but I'm pretty sure that some places do not even request/require you to send med school transcripts. I believe they do all require the dean's letter, though (you may want to check on this). If the repeated class was only prominent in the transcript, and either not mentioned or glossed over in the Dean's letter, it may not come up as an issue at all. Even if it does, it sounds like more of a small dent in your academic record, and unlikely to sink your entire application except at the most competitive programs...this is assuming that it doesn't appear to represent a pattern of behavior such as multiple failed classes or problems in residency too, etc.
I think that given only the info you've gold us, you should definitely go for it. Worst case scenario is you don't get in on the 1st try, which probably won't even happen. If it does, you'll have a chance to reassess and either try for another specialty, do hospitalist or primary care, or re-try for cards. Nothing ventured, nothing gained. Remember that we all use the internet to b*tch too, so take our rants on here with a grain of salt and don't be overly discouraged.