There are commercial kits that do exactly this, such as the Problem Solvers ones:
To be clear, a wheel adapted this way offers none of the advantages of Boost, since the flange spacing remains the same.
While these kits are being sold without any such compunction, it's worth pointing out that they put extra leverage on the hub rotor mounting holes and on the axle. Personally I wouldn't be surprised if there's a scenario where you could get a hub or axle to fail because of this - if you look at some hubs, Hope is what I'm thinking of, you can see there's a very minimal amount of material around the rotor mount. So I'm dubious how universal of a solution these kits really are in that sense.