There is no rarity.
The terms for rarity are defined in the Dungeon Master's Guide for magic items. The Shield Guardian is a creature, not an object (items are objects). Therefore there is no defined way to assign it a rarity based on those terms.
But, more importantly...
There are no rules for creating a Shield Guardian.
As of this posting, there are no rules in 5e for creating a Shield Guardian. The rules for crafting in Xanathar's Guide to Everything are for crafting items and magic items, not creatures. This means that creating a Shield Guardian is entirely a matter of DM rulings or homebrew.
For example, it would be reasonable for a DM to look at the rules for the manual of golems magic item in the Dungeon Master's Guide (p. 180-181) for inspiration. The rules list the time and cost to make a particular kind of golem in the Monster Manual, and these expenses increase with the challenge rating (CR) of the golem. The DM could create a manual of Shield Guardians with comparable expenses based on the Shield Guardian's CR 7 in relation to the golems, plus the effort and expense of creating the amulet to control it.