The rules are slightly ambiguous in these cases, but it seems more logically sound to conclude that you would get spell-like abilities and inherent spellcasting, but would not get a spellcasting feature.
In order:
1st Situation: Creatures with Innate Spellcasting.
You should gain access to these abilities. Innate spellcasting does not work in the same manner as class feature-based spellcasting, and these are similar to any other ability in a stat block (such as natural weapons, inherent multi-attacks, and so on). There is no special knowledge, force of personality, or understanding which is required to produce them, and so the lack of the target's knowledge and mental stats doesn't apply.
2nd Situation: Creatures with Spellcasting (similar to Pact Magic).
The way that the Warlock of the Archfey is described is clearly similar to the Warlock class ability. It's explicitly described in Volo's Guide to Monsters as gaining its powers through a pact with a lord of the Feywild, and it gets a number and level of spell slots similar to a Warlock-classed creature, regains those slots on a short rest, and so on.
Generic stat blocks for NPCs don't usually include class levels, but it's difficult to argue that this creature's non-innate spellcasting is anything but Pact Magic, and therefore you don't get access to it. It's power coming from a patron, and Magic Jar isn't going to convince the patron through its mystical bond into thinking that you're the target any more than wearing a mask that looks like the target's face would.
You get to cast spells you already know through means you already have (you retain your mental stats and class features, including spellcasting through any avenue). Your spell slots do not change, nor do your spells known.
3rd Situation: Creatures With Spellcasting (similar to Spellcasting of Clerics or Wizards).
These magical effects aren't a product of what a creature is, it's a product of what they know (Wizard-like spellcasting) or the favor a deity grants them (Cleric-like spellcasting). In the former case, you don't gain the mental abilities nor the knowledge of the target, so even if the target knows spells you do not know them simply by dint of inhabiting the target's body. In the latter case, the deity favors the target, not you, and so they aren't just going to let you tap and channel their divine power just because you've taken over the body of someone they would grant that ability.
You don't get access to the target's spell slots in any way (directly, or summing them with your own), and you don't get to know the spells that they know. Your spellcasting ability is exactly what it was before the possession, because this type of spellcasting depends on attributes you specifically do not get from the possession.
And yes, you would need to recalculate spell attack bonuses and spell save DCs based on your own spellcasting ability. You are casting the spell, not the target you've possessed, and those values are based off of your mental stats, which remain your own and not your target's.
Rationale
As mentioned in the header on this answer, the rules as written are a bit ambiguous because PCs only get access to spellcasting via class features while NPC stat blocks generally do not include class levels even when they include spellcasting.
Due to the ambiguity we're stuck working by analogy. Magic Jar explicitly states that you get the physical stats of the body you're possessing (STR, CON, and DEX) and that you retain your original mental stats (INT, CHA, and WIS). This basic fact suggests a couple of questions:
1. What are innate spellcasting and spell-like abilities?
These are effects that are magical or are like magic, but don't require an underlying stat to produce. A Red Dragon gets to breath fire, and whether or not that's a product of manipulating the Weave in some way it's definitely not a spell. The dragon doesn't apply arcane formulae or verbal, somatic, or material components to make the effect happen, nor does it appeal to a deity to produce the effect, nor does it tap a mystical connection to a patron according to a Pact to produce the effect. No spell slots are expended, nor can they be, to produce the effect, whether or not the creature has them.
Such an effect is, then, a product of what the dragon is rather than what it knows, is granted by someone else, or is owed by someone else. This fits well with creatures that have poor mental stats, like a Phase Spider. They can use Ethereal Jaunt, but it's not knowledge, force of personality, or understanding which causes it to happen.
That strongly argues in favor of being able to use such abilities when possessing a creature which has them via Magic Jar.
2. What is casting a spell?
In contrast to (1), casting a spell (in the sense of consuming a spell slot) is a result of manipulating the Weave. Arcane casters do that through knowledge and ritual (understand the Weave, do things that cause it to be altered in some predictable way, produce an effect). Sorcerers' powers work similarly, but are built off of an intuitive understanding of the Weave rather than a formal, formulaic study of it.
Divine casters perform magic by tapping into divine power and channeling it in specific ways, with the ability to tap that power being granted by a deity's favor-- a god bends the world (through whatever specific mechanism) to produce a magical effect.
Pact magic works via an explicit agreement between an entity that can grant magical ability and someone else-- the power is provided by the patron and directed by their counterparty.
The common thread among all of these is that spellcasting is not related to who or what an entity is. It's about things they know, things they've done, and ongoing, mystical relationships with others. In such a case there is no reason to think that you would be able to inherit those after possessing a creature's body. In addition to explicitly retaining your own mental stats, there is no mention of gaining any of the knowledge or relationships of your target.
So if you possess an INT-based spellcaster, the more direct analogy is to a creature that has studied arcane magic and learned specific spells (like a Wizard) than to a creature that instinctively can produce a magic-like effect (like the Phase Spider's Ethereal Jaunt). Since you don't know what they know, you don't get the benefits of what they know.
Similarly, there is no reason to think that you could get any other kind of spellcasting feature through avenues. If you can't get access to Divine Spellcasting just by dressing like and imitating Clarence the Cleric, cramming your soul into another body should be similarly ineffective. If an Archfey has struck a pact with someone else, well, that pact isn't with you, and so you don't get to draw on any of the patron's powers.