Shape invariance and equivalence relations for pseudo-Wronskians of Laguerre and Jacobi polynomials