You can add a sub-domain on behalf of having the root domain added or not, but only as a CNAME setup and this might require a higher paid plan, or at least you could add it as an option and a part of the SSL for SaaS as I remember. Could be I am wrong.
The best case scenario and I would advise you to do so, is to add test.com domain to your Cloudflare account.
Therefore, add an DNS record for the A stage hostname (as a sub-domain) and point to to the right IP address where it is being hosted.
May I suggest below articles for help with getting started with Cloudflare for your domain name.
What I really need to know is whether it is a valid configuration to have test.com and stage.test.com as separate websites. Or whether these must be in a single website.
The reason for this is that we want to have separate Cloudflare settings for production and for staging environments.
You can have it as a “single” domain being added to Cloudflare. test.com hostname can be proxied and use all the Cloudflare features (or the ones you need and want to use), while stage.test.com doesn’t have to use any of Cloudflare features at all while being (DNS-only) or can be too proxied and but using Page Rules you define what you want.
Nevertheless, using Firewall Rules you can restrict access and even more.
You can also configure this separately with Cloudflare Page Rules.
SSL for each of them, optimizations, firewall protection, etc.
I am sorry, but I might be missing a point of view from your perspective and do not see a point adding sub-doiman along with the root domain to Cloudflare as a “separate” properties while they both can be “under one”, despite different configurations needed to be used due to the development/production phase.
Again, I’ve manage 70s websites, both being in dev/prod stages.
I only add root domain to Cloudflare.
Therefore, configure everything for the “root” production one.
And then I manage the “stage” hostname as I need, proxy or unproxy it, restrict access to it only for the devs team, remove speed/code/image optimizations, disable HTTPS for it, enable them back to see if JS code works well with auto-minify options, or if the stage sub-domain is working over SSL correctly, etc.
Sure, it is valid. A lot of customers have it like that too. True, it might cost something if so and could be I am wrong about it.
You might want to wait for a reply from someone else more experienced than me about it. Thank you for patience.