The payee can scan for transactions by checking if his private key can decrypt the metadata.
How does the payee get at the stealth private key that can
spend Q' in this scenario?
The decrypted metadata will contain the shared secret necessary to calculate it obviously. Even though it's a random number generated by the payer, it still works as a shared secret because both parties know what it is but no one else does.
And in the scenario mentioned by my edit, the payee would first need to calculate the decryption key by multiplying his private key with the public key of the payer, as usual. Then he can decrypt the metadata and figure out the shared secret, or second shared secret if you will.