That's an odd one. It seems to me that the 1854 penny design was struck first, then something else squashed down the coin's rim, creating the rim letters. My best guess is that it was an insert into some kind of early Encased Coin or jewellery piece, and later removed.
Don't say "infinitely" when you mean "very"; otherwise, you'll have no word left when you want to talk about something really infinite. - C. S. Lewis