The date doesn't quite match, but if it's possible you've misremembered the date slightly this could be The Iron Trial, book one of the Magisterium series by Holly Black. It was published in 2014 so it's a few years later than the date you remember.
Most kids would do anything to pass the Iron Trial. Not Callum Hunt. He wants to fail.
All his life, Call has been warned by his father to stay away from magic. If he succeeds at the Iron Trial and is admitted into the Magisterium, he is sure it can only mean bad things for him.
So he tries his best to do his worst - and fails at failing. Now the Magisterium awaits him. It's a place that's both sensational and sinister, with dark ties to his past and a twisty path to his future.
The school is entirely underground in a series of tunnels as you describe, and there is a trial where the pupils have to find their way through the tunnels, though this isn't a major part of the book.
The big bad guy is the Enemy of Death aka Constantine Madden. He is (was) a type of mage called a Makari, who can use chaos magic. He is describe to Callum as:
“It’s not like that.” Tamara folded her hands in her lap, clearly annoyed. “The Enemy was a great mage - maybe even the best - but he went crazy. He wanted to live forever and make the dead walk again. That’s why they called him the Enemy of Death, because he tried to conquer death. He started pulling chaos into the world, putting the power of the void into animals … and even people. When he put a piece of the void into people, it turned them into mindless monsters.
At the end of the book one of the henchmen of the Enemy of Death, Master Joseph, claims that:
“Because it is the truth,” said the mage, holding the silver mask in his hand. “You are Constantine Madden. And if you look at me closely, you will know my name as well.”
...
“I taught you,” said Master Joseph. “May I rise, Master?”
Call said nothing. I’m trapped, he thought. I’m trapped in here with an insane mage and a dead body.
Apparently taking this as permission, Master Joseph stood with some effort. “Drew said that your memories were gone, but I couldn’t believe it. I thought that when you saw me, when I told you the truth about yourself, you might recall something. No matter. You may not remember, but I assure you, Callum Hunt, the spark of life within you — the soul, if you will — all that animates the shell of your body belongs to Constantine Madden. The real Callum Hunt died as a mewling baby.”
I recognised the book because I read it last year and indeed reviewed it on Goodreads - with a five star rating!