The modern sense was coming into the language in Shakespeare's time, but he never uses it. His meanings all derive from two senses of the adjective rare. The word means "splendidly, excellently" in The Two Noble Kinsmen when the Gaoler's Daughter says that the King of Pygmies "tells fortunes rarely" (III.iv.16) or the Schoolmaster tells the dancers they have "danced rarely" (III.v.158), and this is the sense in Much Ado About Nothing when Hero describes men as "rarely featured" (III.i.60). The second sense is "exceptionally, outstandingly", and this is the meaning required when Cleopatra exclaims "O rarely base!" (Antony and Cleopatra, V.ii.158) or when Lysimachus thinks of marrying Marina: "I'd... think me rarely wed" (Pericles, V.i.68).
The context usually resolves any ambiguity, but we have to be on our guard.
When Bottom says "I could play Ercles rarely" (A Midsummer Night's Dream, I.ii.26) or Margaret asks "Doth not my wit become me rarely?" (Much Ado About Nothing, III.iv.63), we have to be careful to ignore the frequency nuance that can easily come to mind.