If it were just a shield, all you would have to do is close the gap, but when you closed in, you'd be pushed back by the shield, they'd get some distance from you, and then they'd attack with the spear again.