I've had a thought experiment regarding spellcasting, targeting, and hiding. It's known that casting a non-attack spell while unseen is not perceptible by the target, regardless of whether the spell succeeded or not (i.e. scry). However, what about spells specifically with the "spell attack" descriptor?
Here are the relevant rules.
When a creature can’t see you, you have advantage on attack rolls against it. If you are hidden—both unseen and unheard—when you make an attack, you give away your location when the attack hits or misses.
Casting a Spell, "Targets":
Unless a spell has a perceptible effect, a creature might not know it was targeted by a spell at all. An effect like crackling lightning is obvious, but a more subtle effect, such as an attempt to read a creature’s thoughts, typically goes unnoticed, unless a spell says otherwise.
Question 1: Does a hidden spellcaster that uses a non-obvious spell attack remain hidden? Let's assume the target does not notice the casting, either via subtle spell or otherwise (maybe they're in a loud and crowded tavern).
Question 2: If there are saving throws related to question 1, does the target know if it failed or succeeded?
Example A, Ray of Enfeeblement:
A black beam of enervating energy springs from your finger toward a creature within range. Make a ranged spell attack against the target. On a hit, the target deals only half damage with weapon attacks that use Strength until the spell ends.
At the end of each of the target’s turns, it can make a Constitution saving throw against the spell. On a success, the spell ends.
Scenario: A hidden sorcerer uses subtle spell to cast ray of enfeeblement at a target. For the purposes of this example, combat has not started yet (so the target is not hostile) and the target does not see the black ray. Does the target know it was enfeebled? If the target remains ignorant, does the target know it made a saving throw after 6 seconds?
Example B, Plane Shift:
You can use this spell to banish an unwilling creature to another plane. Choose a creature within your reach and make a melee spell attack against it. On a hit, the creature must make a Charisma saving throw. If the creature fails this save, it is transported to a random location on the plane of existence you specify. A creature so transported must find its own way back to your current plane of existence.
Scenario: A hidden wizard uses a familiar to deliver the touch spell on a target. If it succeeded its save, does it know it was targeted?