Since the audience, along with Vargas, sees the empty shoebox before it is filled with dynamite and used as false evidence to frame Sanchez, we know that Sanchez and Vargas are telling the truth when they say that there was no dynamite in that box prior to the police investigation. After Sanchez is arrested, the only time we see him again is when he is being interrogated. At the end of the film, he confesses, and Schwartz remarks that Quinlan's Gut Feeling was right all along. However, just because Sanchez confesses does not mean he's actually guilty. Under interrogation, people can only take so much pressure before they break and tell their interrogator whatever they think the interrogator wants to hear to make it end, regardless of whether or not it's actually the truth. There was even one instance where four men, all innocent, confessed to a single murder that none of them actually committed because their interrogators pushed them that far. Assuming that Sanchez has been under constant interrogation throughout nearly the entire duration of the film, that's plenty of time for the pressure to build past Sanchez's breaking point, leading him to confess to planting the bomb despite being innocent, just so that he could end the interrogation. So, despite what Schwartz says at the end, Quinlan wasn't necessarily right about Sanchez being guilty, and planting the dynamite in the box as false evidence just sentenced an innocent man to hours of interrogation that could only be ended with a false confession.
WMG / Touch of Evil
Sanchez is innocent.Note: This troper has only seen the 1998 restored edition, so this WMG might not hold water based on other versions of the film.