You have an error in the loop condition: the inner loop iterates up to the same bound as the outer one. This is almost certainly wrong, it should iterate to the size of the current line vector. Like this:
for (size_t x = 0, vecSize = myVec.size(); x < vecSize; x++) {
std::vector<int>& curVec = myVec[x];
for (size_t y = 0, curSize = curVec.size(); y < curSize; y++) {
cout << curVec[y] << " ";
}
cout << "\n";
}
This code will work flawlessly for any shape of the 2D array.