The Cercanias trains come in to a separate area at Atocha, but it isn't far to get to the other city- to- city tracks. You don't have to be waiting for the train 30 minutes ahead. Sometimes they don't even post the tracks that early..
In Atocha Station there are a set of tracks upstairs and also a set downstairs. When you go to the security checkpoint at the train station someone will look at your ticket and tell you if you are supposed to be on the upper or lower level to catch your train to Pamplona. I think we were on the lower level last summer. We were not on a high speed train, but we took the 7:30 am train.
There's very little seating to wait inside security so mostly people are just standing where they can see the monitors.
What is the plan in Pamplona? Will you stay the night or take a cab right away to SJPDP or Roncesvalles or are you starting in Pamplona?
Edit: Train station at T4 is on the lowest level. You are looking for the Cercanias tracks, not the Metro.