Summing my question into one LONG sentence:
Does magic actually exist in the DC universe or is it — and are spiritual realms such as heaven, hell and purgatory — essentially pocket dimensions that can be explained through science?
There is absolutely magic in pretty much every incarnation of the DC Universe. The magic does typically have laws and rules that non-magicians can understand (or at least ones that Batman can understand to a degree).
Zatanna, a member of several incarnations of the Justice League and frequent ally of Batman's is explicitly a magic-user. She incants spells and can cause effects on the fly. She doesn't need any prep time (beyond thinking up the words) or to manipulate any controls. Her powers are strictly magical and cannot have any technological explination (unless she's rewritten such that she does).
Dr. Fate is another explicitly magical being. He uses magical artifacts in addition to spells. While it is possible he could be rewritten as a 'high-tech that looks like magic' character, there's many instances of other high-tech people not believing in magic, testing his abilities, and admitting they aren't tech.
Wonder Woman is perhaps the best instance of a 'magically-powered' DC character. Depending on the backstory, she was given life by the Greek God Zeus. Her armor was crafted by Hephestus, blacksmith of Olympus. She's got powers bestowed upon her by various Olympian deities and has literally punched Hades in the face while he sat upon the throne of the Underworld.
There's more (and more and more and more) characters I could discuss. Captain Marvel (his name is not Shazam!), Solomon Grundy, the first Green Lantern, many different DC characters are empowered by magic.
But finally, here's a final argument:
Using magic, a 10-year-old boy is a serious threat to Big Blue. Note that Superman has fought against high tech. He's torn tech from the 41st Century apart with his bare hands while it was trying to blast him. He's fought against the best tech a 5th dimensional imp can turn against him (Myztyplx being one of the 'looks like magic, but really tech' guys in the DC Universe). And Captain Marvel's lightning can floor him. Captain Marvel's magical lightning.
As far as the other part of your question...DC Comics quite wisely stays out of religion as much as possible. Many creatures in DC, including Wonder Woman, Darkseid, and others have professed belief in higher powers. Many beings which claim to be gods, Gods, and/or Godly have existed. Many realms that purport to be divine have been seen.
DC hasn't 'officially' said if any of these things are divine. There's no way they could do that and not upset a significant number of vocal people. The closest they've come is when you talk about Spectre.
Magic exists, as do spiritual realms of some kind, but their exact nature is deliberately left ambiguous. Some characters believe that magic and the spiritual realms can be explained through science, but others don't, and each side has evidence to back its claim. It is generally not stated which one is right, nor is it stated how the apparent contradictions could be resolved, so that these sides are left in tension.
Some characters even go the other way, by believing that science is just another form of magic. Many of the magic-is-science folks would be offended by that idea, though.