What was shown in the movie was real: Hanson and Penhall died middle-aged, working for the DEA. They just never realised they died and that they are in the afterlife now. Thus the world we see in the "Back from the Future" episode is not the real world but it is the version of the rest of their lives as they really wanted it to have been.
- Hanson: He mentions in the later seasons of the series that he really wants to start a family and he feels that that isn't compatible with police work. He really died before he could quit the police and could start a family, but in the afterlife he believes his life has worked out in the version he wanted (hence his mentioning he got happily married with children after quitting the police).
- Penhall: Really wanted to become a priest instead of a police officer. Note that he mentions sometimes during the series that his own father used to be a priest and also that after his wife Marta was murdered, he really started to question his being a police officer. He never quit and got shot dead as shown on the movie, but in the version of his life as he imagines it and which he tells about in "BftF", he did become a priest.
- Hoffs: Mentions she made a career in politics and became a senator. This fits as something her character would have been great at but, if she'd stayed a police officer her whole life, would never have gotten to.
- Ioki: Tells he became a martial arts instructor / gym owner, and a consultant for the immigration/naturalisation national service. That would mean he made his hobby/passion his life and again, probably is what he's wishing his life to be.
This theory would nicely reconcile the continuity of the film with the "Back to the Future" episode of the series—which it otherwise would contradict and clash with.