This is Mythic Alliance by Jendra, published in 2010 on fanfiction.net.
They say there's no such thing as a magical Animagus. They're wrong. Harry Potter, Severus Snape and Draco Malfoy join together in an alliance no one, especially Voldemort, is expecting. Severus/Harry mentor, Harry/Draco friends. No slash.
Harry and Draco both get the potion on themselves and have to go into Snape's office and strip off their robes to get the potion off of themselves.
In the first chapter, Snape pairs Draco and Harry for Potions class (because he finds it funny); Neville and Crabbe are located next to them, Snape shouts at Neville, Neville jumps in fear and bumps his cauldron on his neighbours.
Snape indeed sends them to change clothes in his office, as the potion touching their skin could have dire consequences.
Potter and Malfoy jumped away with exclamations of disgust as their hands moved to wipe off the mess on their robes.
"Stop!" Snape barked out. His voice alone contained enough command, as well as enough magic, to freeze everyone in the classroom in place.
"Back away from the potion," Snape ordered. "Potter, Malfoy, go into my office and get out of those robes. Without," and that word had enough emphasis to be almost shouted, "without touching the potion, or allowing it to get on bare skin. Weasley and Goyle will bring you new robes."
Harry then ends up hiding under Snape's desk so that Draco and Snape don't discover his abuse.
While they're in Snape's office, Draco notices that Harry isn't exactly keen on going naked, taunts him about it, and eventually strips him magically (it's actually less creepy than it sounds). Harry goes under Snape's desk but too late, Draco saw the scars.
Draco kept the smirk on his face, but inwardly he was getting concerned. He knew the potion was sinking through his rivals robes and his stupid modesty was keeping him from getting them off quick enough. His concern turned to anger and his anger to action. "Expelliarmus clothing!"
Draco's smirk got bigger as Potter's clothes started to fly away from his body. Harry was grabbing at them furiously but Draco's magic was too strong. As Draco looked at the other boy though, the smirk disappeared as his eyes widened in shock.
Harry made a pained sound as he curled in on himself trying to hide. At Draco's involuntary step towards him, he scuttled backwards, ending up curled under Snape's desk.
Draco just stared for a long moment at his rival's hiding place, complete disbelief and shock the only expressions on his face. For a moment he wavered indecisively before striding to the door. Remembering his own state of dishabille, he stuck only his head through the doorway.
Then later, Snape and Draco heal Harry together since Draco helps Snape with potions and whatnot. So they heal Harry when he is in "detention" with Snape as Harry just sits on a stool.
As it happened, although this wasn't exactly good faith at first, but rather crash-testing of Draco's skills in brewing healing potions.
"I believe," Snape said, without any formalities, "that, since we have the perfect guinea pig coming for detention, it's time to test you on your healing potions."
"You want me to dose Potter?" Draco asked in surprise. "He's not going to like that."
"And I should care, why?" the professor smirked back. "I get to choose what the detentions I give are and we have need of a test subject for your healing potions. I'm sure Potter will consider it an honor to be yours."
Found with the Google query
harry potter fanfiction draco snape "under * desk" -site:pinterest.*, it was on the second page of results.