Can you get the same relic twice?

Not from rewards or shops, in either game. At the start of a run each relic rarity is shuffled into its own list. Rewards take relics from the front of the list and Merchants from the back, and each relic taken is removed.

When a rarity's list is empty, the game takes from the next rarity up: common, then uncommon, then rare. If every list is empty you get Circlet. In StS1 extra Circlets stack on the first one, and an empty boss relic list gives Red Circlet. Relics you have not unlocked are never in the lists.

Relic rarity odds

SourceCommonUncommonRare
Elite reward, both games50%33%17%
StS1 chestdepends on size: see reward odds
StS1 Merchant, first two relics48%34%18%
StS2 Merchant, first two relics50%33%17%

The third Merchant relic is always a Shop relic. Shop relics appear only at the Merchant.

Merchant relic prices

RarityStS1StS2
Common150175
Uncommon250225
Rare300275
Shop150200

StS1 prices vary by up to 5% either way, StS2 prices by up to 15%. At StS1 Ascension 16 all Merchant prices rise by 10%.

Boss relics

In StS1, after the act 1 and act 2 bosses you choose one of 3 boss relics. The boss relic list is shuffled at the start of the run like the others.

StS2 bosses do not give boss relics. Several StS1 boss relics (Astrolabe, Black Star, Calling Bell, Empty Cage, Pandora's Box, Runic Pyramid, Snecko Eye, Ectoplasm, Sozu, Philosopher's Stone and Velvet Choker) are offered by the Ancient Darv instead. See Neow and the Ancients.

Relics from events and Ancients

StS2 has a separate group of relics that only events and Ancients give, such as the relics Neow offers. They are never in the reward or Merchant lists.