Certifying randomness in quantum state collapse