Making the answer as simple as possible: a snippet of Spiritual Weapon description:
Clerics of deities who are associated with a particular weapon (as St. Cuthbert
is known for his mace and Thor for his hammer) make this spell's effect resemble
that weapon.
It is not a weapon. It is a 2nd level spell whose effect resembles a weapon. The Rakshasa is immune.
Death, by virtue of no choice at all
If players are given a choice between outcomes, but one outcome is forbidden, then it defaults to the only available outcome.
Monster Manual, pp7 under Hit Points states:
A monster usually dies or is destroyed when it drops to 0 hit points.
Meanwhile, the Players Handbook, pp 197 states (emphasis mine):
When you drop to 0 hit points, you either die outright or fall unconscious
Now, they're clearly using "die outright" for when Instant Death occurs via remaining damage equaling or exceed hit points maximum. However, combining the two generally leads to the idea that the Monster Manual suggests death, while Players get unconscious or death. Since some creature are immune to unconscious, they would most likely just die.
A more narrative path
This, of course, doesn't mean you/your table can't find a middle ground. Maybe you don't want that elemental to simply die as they are a player in your storyline. That's fine! You can either 'reflavor' the Unconscious condition or come up with some reasonable substitute (maybe just Incapacitated?) There are also options of adding things like the Frenzy Barbarian DC check to stay at 1HP or other abilities that prevent creatures from going to 0 HP.
Best Answer
Yes.
When a monster has resistance to "mundane weapons", the statblock will usually specify "Resistance to non-magical bludgeoning, piercing and slashing." This means that the monster has resistance to any non-magical sources of those damage types, such as slashing from a sword or bludgeoning from a club. Spells such as magic missile and witch bolt are inherently magical due to their nature as spells, and so would hurt such monsters. Furthermore, magic missile does force damage and witch bolt does lightning damage, neither of which fall under the categories of "bludgeoning, piercing, or slashing" damage.