It really depends on what kind of program you’re looking for. If you want to match at a research-heavy, brand name residency, then it is important. This includes the “top 10” or similar residencies. If you want to just match in general, then it doesn’t matter as much.
What’s more important than publishing is the effort and quality of the research. Piggybacking on a clinical trial where you did some data entry isn’t as impressive as helping design, analyze, and write the paper/poster. In interviews I ask applicants what they did, and often the answer is very shallow or not meaningful.
What matters more are LORs, scores, and the name of your medical school. You may not necessarily match at your top rank or top 3, but you should certainly match with your stats if you don’t mess up your interviews.