Depends on how your DM is feeling
While the spell is named Wish, you are not actually posing your wish to any actual entity.
Wish is the mightiest spell a mortal creature can cast. By simply speaking aloud, you can alter the very foundations of reality in accord with your desires.
As you can see, you are not asking a divine entity for aid when you're casting wish, you're meddling with the very fabric of reality in an attempt to brute-force it into what you'd like to happen. It's not divine intervention.
Because it is not one of the default applications of Wish, you fall in the following paragraph:
You might be able to achieve something beyond the scope of the above examples. State your wish to the GM as precisely as possible. The GM has great latitude in ruling what occurs in such an instance; the greater the wish, the greater the likelihood that something goes wrong. This spell might simply fail, the effect you desire might only be partly achieved, or you might suffer some unforeseen consequence as a result of how you worded the wish. For example, wishing that a villain were dead might propel you forward in time to a period when that villain is no longer alive, effectively removing you from the game. Similarly, wishing for a legendary magic item or artifact might instantly transport you to the presence of the item’s current owner.
Simply wishing "I wish Bob was alive again." might result in reality reshaping itself to erase the Lich from history, thus wiping out the event that killed Bob in the first place, or it might send you back into the past to a point where Bob was still alive, or it might just create a soulless clone of Bob, it depends entirely on your DM at that point.
Most likely the safest wish in this case would be to wish something along the likes of "I wish to speak to Bob's god, to make them aware of the fact that their soul has been destroyed by a Lich". It's in the god's best interest that Bob's soul is restored, so if there was any way of using wish to reliable revive Bob, this would likely be it.