An Exponential Sum and Higher-Codimensional Subvarieties of Projective Spaces over Finite Fields