It's addressed in the Pokedex entry and implied by when he's given to you. You are right, there were three Type: Null, one was put down, the other was Gladion and the third was given to the protagonist by Gladion in Sun and Moon.
The Sword 'dex entry states
>Rumor has it that the theft of top-secret research notes led to a new instance of this Pokémon being created in the Galar region.
Coupled with the fact you get offered it after Chairman Rose gets sent to prison and Leon takes over the company, it's safe to assume Chairman Rose's company, Macro Cosmos, had stolen research from Aether Foundation and created their own Type: Null.