In Shakespeare's time, no Jews had been legally present in England for several hundred years (since the Edict of Expulsion in 1290).
Hyam Maccoby argues that the play is based on medieval morality plays, in which the Virgin Mary (here represented by Portia) argues for the forgiveness of human souls, as against the implacable accusations of the Devil (Shylock).