It's never explicitly stated anywhere, and I can't find any quotes from production staff.
However, what we do know:
1) Mel knows that the two crime families at the wedding suspect him of working with the Feds, and was justifiably afraid his life was in danger because of it.
2) The witness protection program is out of money and if he needed to go that route, it can't protect him. Also, corruption is all over the place, so any organization that tried to hide him might spring a leak.
3) Quinn is probably going to talk to the FBI to try and get this whole mess cleared up. If nothing else, he's an earnest young man trying to do the right thing.
4) Mel makes a special request for Quinn to walk him to his car, and it's only because of that that Quinn is in position to witness the car bomb, or at least the immediate aftermath.
5) Quinn is walking away from the car and thus doesn't actually witness the moment it explodes, just the car being covered in flames.
6) There's nothing about it on the news (however, people in the know, like alt-Rembrandt, are aware of it, and Quinn himself pesters the cops to try to get them to look into it).
7) He makes a point of showing himself to Quinn, the one good-hearted person who was around to witness his "death" one most of the people who wanted him dead are arrested.
8) Mel doesn't appear to be injured or burned at all when he returns.
Oh, and 9) San Francisco is basically like Vegas in this world.
I think the evidence pretty clearly implies:
Mel faked his own death, and used Quinn as a patsy to help sell the idea that he's dead to the people who are after him. Because there were multiple families involved, they might easily assume the other one acted to remove the leak (not to mention smaller families who might feel he'd done the same). He had a carbomb fake-death escape-plan already prepared, and maybe his car was gimmicked up to allow him to slide out of it quickly. Quinn would then back up the story to the authorities, who wouldn't investigate too closely if they believe organized crime is involved.
Exactly how he escapes requires some degree of speculation... they obviously couldn't show the method onscreen or it would have spoiled the surprise of his survival! But Mel's a performer in a Vegas-like city and likely knows a bunch of magicians that could help him pull it off... presumably, somehow, he slipped out of the car, let it explode, and got away in the confusion. Later, when he thought the people after him were dealt with, he showed himself to Quinn because he felt bad about using him.
There's no direct evidence, but there's at least one plausible possibility made available by the staging:
There was a car on the other side of the fence where Mel parked, briefly seen before they enter the car.
It's not seen again after that, but from the angles they showed, that's not evidence either way.
Also it's brief, but when he gets into the car, before he starts it, Mel takes a moment to watch Quinn, as though he's waiting to make sure he's not looking back.
So it's possible he slipped out of the car, pulled back previously-set-up detached part of the fence (any effort to fake a death would have required some pre-planning), and got into the second car either before or in the immediate aftermath of the explosion.
The main problem with this theory is in point 5, and as you mention in the question, it's only seconds after Mel gets into the car that we see Quinn walking away and then the explosion.
That doesn't seem like enough time for Mel to slip out and get away.
However, Sliders has never been good at accurately portraying time. Only a few episodes earlier, in "Gillian of the Spirits", the Professor makes a specific point about the Vortex being only open for 60 seconds. The scene lasts nearly three minutes from vortex-opening to vortex-closing (in "Greatfellas" itself, it takes a minute and forty-six seconds, with nobody feeling the need to rush). In virtually every case the portal lasts as long as it needs to for everyone the plot requires to get through, to get through (even if that's more than the core 4), and then almost immediately closes. There are numerous other instances where the time left on the timer doesn't match how long it takes for them to activate it. I'd say it's fair to chalk this up as another instance of disregard for actual time in the service of drama, and that Quinn was actually walking away for a much longer period of time, and to keep the episode moving we just showed it for a few seconds.
There is, it should be noted, a seemingly unnecessary cut/camera change while he is walking. Also, it took at least 15 seconds for him to walk about the same distance while talking with Mel that we saw for about 5 seconds on the way back.
That's still not a whole lot of time to make any kind of escape, but it's fiction, and since we don't have any evidence at all for "Quinn Imagined Seeing Mel" as a theory (he's had much closer people to him die without imagining them), it seems like it's the only reasonable answer.
Of course, the real out-of-universe answer is probably that Mel Tormé is the father of show creator Tracy Tormé, and as the episode guide entry on the Sliders fansite reveals:
One of the joys of Tracy Tormé’s second season of Sliders, in which he had the opportunity to cast his famous father, Mel Tormé, as a Bible-thumping, whiskey-swilling, country-music-singing government informant. “Everything he’s not,” Tormé says, “in this life. This show was special to me obviously, because my dad was in it, and my wife also has a cameo in it. She’s one of the bridesmaids at the beginning of the show. I was there for the whole shoot, and I wrote the song for my dad. Writing a country music song for my dad was definitely a trip.”
“It was great to work with my dad, and I wrote some music for him, a little country and western song,” Tormé explains. “The whole concept of casting him as everything he hates — country and western music, drinking, Bible thumping — and to turn him into a character who keeps wanting to get back to his ranch in Nashville; I got a great kick out of that.”
While he clearly had fun gently teasing his father with this portrayal, considering they were close, making an episode where his father didn't survive probably didn't sit well with him. In fact, Mel's subsequent illness, leading up to his death three years later, was one of the things (in addition to massive studio interference) that led to Tracy distancing himself from the show:
Tracy was particularly happy to have had this experience with his father, because shortly after he was greeted with the bittersweet promise of a third season, his dad got dangerously ill. “I wanted to spend the time I needed to with my family,” he says. “It took me away from the show also. So with all those things happening at once, I made a very conscious decision that not only was I going to leave the show, but I could not be simply half-involved with what was going on, because that would be too frustrating, especially since I didn’t agree with a lot of the decisions that were going to be made.”
Ultimately, “that show was very close to me,” says Tormé.
Although Mel Tormé died three years later, "Greatfellas" was his last TV appearance before his actual death.