The genetically engineered blacklist always struck me as the least 'Starfleet' thing Starfleet does in any series. It creates a second class of citizen
The JAG Admiral was right: they can't afford to risk creating another Khan. So that, IMHO, makes the Federation's prohibition justified.
Bashir would appear to be a special case. He, and the Federation itself, is just lucky he didn't turn out like Khan.