Illegal where the individual user is located. I don't think there is a technical solution because Bitcoin's scripting language is so open ended*. If it was impossible to store arbitrary data outside of OP_RETURN outputs and OP_RETURN outputs could be pruned (intra-transaction pruning) then it wouldn't be universally pruned. Local users would prune what they feel is objectionable or illegal on an individual basis. All that is academic though because it is so easy to encode arbitrary data in the blockchain in a manner which simply can not be pruned by full nodes.
The simplest method would be in a native (non-P2SH) multisig output. Any PkScript would work but up to 3 of 3 native multisig with an output just above the dust threshold is considered standard, can't be pruned, and can be used multiple times in one transaction.