It's not only Confluence users who can take quizzes. You can let people without an account in Confluence do that as well.

Configure Confluence

If you want to allow participants, who don't have an account in your Confluence, to take quizzes, make sure Anonymous access is enabled to your Confluence site in global permissions (only the 'can use' checkbox needs to be selected in the 'Anonymous Access' section)

While anonymous access to your Confluence site must be enabled in global permissions, public access to spaces with quizzes does not need to be granted. Therefore anonymous users do not need space permissions to take quizzes.

Enabling anonymous access to your site does not mean that non-logged-in users will be able to browse pages and spaces in Confluence. As long as a space is not publicly accessible (anonymous users do not have space permissions), non-logged-in users will not be able to browse pages and spaces, while being able to take quizzes.