Why, Hollywood, do you churn out so many romantic comedies in which blonde women and rugged men entangle themselves with ghosts? Supernatural romance is best left to crystal-ball psychics, and metaphysics is best left (of course) to the metaphysicians. Its unfortunate genre aside, Mark Waters’ “Just Like Heaven” is not as bad as one would think — especially after glimpsing its repellent trailer. The film has its moments of self-assured funniness and two self-assured stars, but it ultimately lacks the undeniable charm of Waters’ “Mean Girls.”

Reese Witherspoon (Elizabeth Martinson) reprises the pretty-and-effeminate-but-deep-down-powerful role she made famous in “Legally Blonde” — not to mention the far better, and far more sinister “Election.” Elizabeth, an overworked doctor, becomes a disembodied spirit 10 minutes into film, driving herself into a horrific car wreck on her way home from a 26-hour shift. The role isn’t exactly an exercise in theatrical genius, but there is something undeniably comforting to see Witherspoon in a role she has all but mastered.

When Elizabeth attempts to return to her apartment — possibly the single most beautiful living space in all of San Francisco — she finds it inhabited by a lonely (and attractive!) out-of-work landscape architect named David Abbott (Mark Ruffalo). It should come as no surprise to anyone who has seen the hundred movies like “Heaven” that Abbott is the exact opposite of the former Dr. Martinson. He seems to spend a large majority of his time drinking Miller Genuine Draft, making rings on a coffee table that once belonged to a woman who most certainly liked coasters.

The unwilling and unlikely roommates spend most of the first half of the film squabbling over their supposed delusions. First come arguments about each other’s spirit — both accuse the other of not sufficiently coping with the challenges in their lives. Then — surprise! — they fall in love.

At times, the dialogue descends into the cringe-worthy of made-for-TV specials about the boy in the bubble (“If we can touch,” Dr. Martinson’s ghost asks her lively boyfriend, “do you think I might wake up?”). It doesn’t help matter that Witherspoon sporadically abandons her sharply honed archetype in favor of acting that genuinely resembles the all-emoting flatness of high school drama students.

But the film, its writers and actors all are redeemed by the surprisingly hilarious one-liners that are sprinkled at the most unexpected moments. (There’s an especially funny one during an otherwise standard you-shouldn’t-be-in-love-with-a-ghost talk between David and his best friend.)

Another near saving grace is the film’s bizarrely acute awareness of its hokey premise. Every time “Heaven” seems to be delving too far into the realm of cheap tricks, magic shops and diffuse sunlight, the film’s gimmicks are taken so self-consciously far that they transcend triteness for the greener pastures of irony. (David’s spiritual counselor, for example, happens to be the lead actor from “Napoleon Dynamite.”)

The film also contains some subtle — and some not so subtle — references to ghost movie classics. If it had pretended to be original, there would have been some serious problems. So it’s a relief that there’s a nod to the Steve Martin classic “All of Me” — when fighting in a bar over his drinking habits, Elizabeth inhabits David’s body and forces him to fight himself, then walk out of the bar with his mixed-up head hung down.

And after trying to deal with his ghost problem with a seance, an exorcism and fire-throwing Asian women, David calls in a troupe of plumber-like middle aged men (who attempt to catch the spirit while the “Ghostbusters” theme plays in the background).

The rest of the score, though enjoyable, offers the usual fare: covers of pseudo-classics by no name artists. Sometimes things go horribly wrong: The Cure’s “Just Like Heaven” might have the same name as this film, but someone really should have given the lyrics a better listen before allowing a woman to sing it in the opening sequence. (Reese Witherspoon’s love affair from the afterlife has little to do with androgenous oral sex.)

But the real highlight is Beck’s “Strange Invitation,” a classic B-side from “Odelay,” another gorgeous song that has nothing to do with Reese and company. This discontinuity may seem minor, but it’s a strong example of the film’s carelessness and incoherence.

After all, despite its strong points, the film is ultimately a stereotypical romantic comedy. The actors avoid complete failure, but they are given little to work with. To its credit, there are some minor gestures toward third-wave feminism, metaphysics and ethics, even the importance of a living will. (In the aftermath of the confounding Terry Schiavo controversy, the latter is no light topic for a Hollywood film to deal with).

There was precious little ground to break in its genre, and “Just Like Heaven” — despite its relative strong points — has left that ground safely intact.