Can Instinctive Charm feature from the Wizard's School of Enchantment (PHB, p. 117) be used against incoming spell attacks?
Yes, you can use Instictive Charm against spell attacks. You can use it against anything that requires an attack roll, not just against the Attack action. From the PHB at p.205:
Some spells require the caster to make an attack roll to determine whether the spell effect hits the intended target.... Most spells that require attack rolls involve ranged attacks.
Note that these are different from spells targeting you against which you get to make a saving throw. Instinctive Charm won't help you with those. Compare Ray of Frost (ranged attack, Instinctive Charm helps) vs. Acid Splash (DEX save, no help here), for instance.