Pharah is more situational than Sombra imo. She requires support, unless you manage to skirt the hitscans. And not wander off so you keep flankers off your teammates, she can act defensively which is useful.
Sombra is versatile and fits practically any scenario, provided you pick the right targets. Sombra can be a HUGE hassle to enemy team. Know whom to hack, keep track of enemy ult, time your EMP. Sombra takes tremendous effort though.