On residually finite groups with an Engel condition on infinite subsets