You backup encrypted in iTunes, then archive the backup inside iTunes.
That - is the first step.
The public beta is a profile you install. Once that profile is installed and you go to settings > general > software update > the new public beta will be listed there.
And it's an upgrade.
Whatever I had on the iPad, I still have on the iPad, same with the phone.
Once the beta period is over, either the latest gm build is the same and you don't upgrade, and everything is normal, and then the next stable release is the next upgrade (and again you keep everything). Or if there's a reason for apple to make final changes, a new builder number is out, and your 'gm' build gets upgraded to the same version number 'gm' but a different build number.
Short reply: you keep your stuff.
Worst case scenario: it's a beta; you accept the risk of losing everything due to bugs and glitches. Hence the backup.