We prove that a smooth compact submanifold of codimension $2$ immersed in $\mathbf{R}^{n},n\geq 3,$ bounds at most finitely many topologically distinct, compact, nonnegatively curved hypersurfaces. This settles a question of Guan and Spruck related to a problem of Yau. Analogous results for complete fillings of arbitrary Riemannian submanifolds are obtained as well. On the other hand, we show that these finiteness theorems may not hold if the codimension is too high or the prescribed boundary is not sufficiently regular. Our proofs employ, among other methods, a relative version of Nash's isometric embedding theorem and the theory of Alexandrov spaces with curvature bounded below, including the compactness and stability theorems of Gromov and Perelman