Spain's recently ousted foreign minister has criticized PM Mariano Rajoy over legal challenges against pro-independence Catalan politicians.