Barrier Certificates for Unknown Systems with Latent States and Polynomial Dynamics using Bayesian Inference