Coming from a mid-tier USMD, I can vouch that we have people match every year with extremely average grades, board scores, and minimal research, even without H in surgery. The people who have trouble matching at my institution are exclusively those with "red flags" or who are extremely geographically limited. I think people underestimate the number of people with red flags if you include preclinical failures, clerkship remediation, step failures, and other random things (e.g., professionalism issues, bad MSPE comments, unexplained gaps, etc...). It's probably close to 10-15%.
As for the shelf, how high do your scores need to be to honor (either raw score or percentile)? Shelf exams are pretty much about thoroughness and repeated exposure. Basically you want to pick a "comprehensive" resource (probably UWorld) and treat it like a textbook that contains everything you need to know for the shelf exam. You want to know the full details (epidemiology, risk factors, presentation, diagnostics, management, complications, and high-yield factoids) for every medium-yield disease (e.g., AFLP) and have an almost "fluent" understanding of the high yield diseases/scenarios (e.g., preeclampsia, HIV in pregnancy). Medium yield diseases usually present picture perfect with well-aligned risk factors, while high-yield diseases are often vague with inconsistent symptoms. Don't bother specifically going after low yield diseases (e.g., pemphigoid gestationis). Make an anki or two reminding you that it exists and move on.
Something I wish I had done earlier is go through UWorld with more focused blocks on a first pass (i.e., blocks of "breast" "pregnancy"). You'll get some questions where the topic gives away the answer, but you will see patterns and integrate much, much more effectively. Take an NBME mid-clerkship, finish UWorld with 1-2 weeks to go, and then start hammering through NBMEs, UWorld incorrect/marked, or AMBOSS questions. Don't try to do too much. UWorld + NBMEs + either incorrects or some AMBOSS is all you need. Remember it's about thoroughness and repeated exposure, not just repeated exposure. I know a lot of people who did UWorldx2 + AMBOSS + every NBME practice exam and still didn't score all that high because they only learned the surface level fact being tested, not the full disease behind the question. First pass is about being thorough. 2nd pass is about nailing the presentations and integrating the patterns. Listen to Divine Intervention the day before the exam.
Do all the above and I assure you that you'll score 85+ on every shelf. Good luck!