Yes, the additional necrotic damage from Hex 5e applies to any attack that hits the target, whether it's a spell attack like Eldritch Blast or a physical attack with a weapon.