If the state doesn't make it a mandatory part of the school curriculum and a mandatory requirement for entering the country (or becoming a state resident, if said person cannot show they've already been trained), then the state simply cannot claim that training is necessary for "public safety".
After all, people can own firearms and carry on private property without a carry permit, even though missing the target exposes the public to danger. As such, the training claim clearly is an all-or-nothing thing. Either everyone who might ever have access to a firearm has to go through it, or nobody does. This is why making it a mandatory part of the school curriculum is clearly the proper approach: it ensures that everyone gets trained in the safe handling and use of firearms, regardless of whether or not they'll end up needing it in the future.
I think the state would just make the argument that you cannot exercise that right until one does the training.
And I think you'd also hear the argument that no right requires "training", to which the left would response "no OTHER right requires training".
I don't see anything about training in the 2nd amendment. I guess if we need that, it should be amended to say training is required.