Is there any way to opt out of this?
But that's so discouraged, and the normal process is so automatic and hectic, that it's very rare. Few even realize the blood-spot permanent-collection is happening.
There was a proposed bill in 2015 to require signed consent before the collection, but it was defeated. See very end of:
https://nakedsecurity.sophos.com/2015/11/12/california-colle...
Much as you can opt out of the Second Amendment protection of firearm ownership by moving out of the US.