How to show that this $2n \times n^2$ matrix has rank $2n-1$?

The $2n$th row is the sum of the first $n$ rows minus the sum of rows $n+1$ through $2n-1.$ Thus the rank is at most $2n-1.$

The last $n$ columns in the first $n$ rows and the $0$s in rows $n+1$ through $2n-1$ in the last $n$ columns, show that the only way to make a row of $n^2$ zeros a linear combination of the first $2n-1$ rows is to make the first $n$ coefficients in the linear combination equal to $0.$ But then you can't get $0$s in the first $n^2-n$ columns except by using $0$ as the $(n+1)$th through $(2n-1)$the coefficients. Hence the rows other than the last one are linearly independent.