The answer is
$701149020$
Because
We may rank the students by height $\{1,2,3,\cdots,25\}$.
Since each student must be taller than any to their left (in their row) and any in front of ("above") them (in their column) then any such square is a standard Young tableau of shape $(5,5,5,5,5)$ (by definition).
The number of standard Young tableau of shape $\lambda$, $d_\lambda$, is given by the hook-length formula, $d_\lambda = \frac{n!}{\prod h_\lambda (i,j)}$
...where the hook length, $h_\lambda (i,j)$, is the number of cells which are either in row $i$ but not to the left of $j$ or in column $j$ but not above $i$.
As such
$d_{(5,5,5,5,5)} = \frac{25\cdot 24\cdot 23\cdot 22\cdot 21\cdot 20\cdot 19\cdot 18\cdot 17\cdot 16\cdot 15\cdot 14\cdot 13\cdot 12\cdot 11\cdot 10\cdot 9\cdot 8\cdot 7\cdot 6\cdot 5\cdot 4\cdot 3\cdot 2\cdot 1}{9\cdot 8\cdot 7\cdot 6\cdot 5\cdot 8\cdot 7\cdot 6\cdot 5\cdot 4\cdot 7\cdot 6\cdot 5\cdot 4\cdot 3\cdot 6\cdot 5\cdot 4\cdot 3\cdot 2\cdot 5\cdot 4\cdot 3\cdot 2\cdot 1}$
$d_{(5,5,5,5,5)} = \frac{25\cdot 24\cdot 23\cdot 22\cdot 21\cdot 20\cdot 19\cdot 18\cdot 17\cdot 16\cdot 15\cdot 14\cdot 13\cdot 12\cdot 11\cdot 10\cdot 9\cdot 8\cdot 7\cdot 6\cdot 5\cdot 4\cdot 3\cdot 2\cdot 1}{(5\cdot 5)\cdot (8\cdot 6\cdot 7\cdot 6\cdot 5)\cdot (6\cdot 3)\cdot (4\cdot 4)\cdot (5\cdot 3)\cdot (7\cdot 2)\cdot (4\cdot 3)\cdot 9\cdot 8\cdot 7\cdot 6\cdot 5\cdot 4\cdot 2\cdot 1}$
$d_{(5,5,5,5,5)} = \frac{25\cdot 24\cdot 23\cdot 22\cdot 21\cdot 20\cdot 19\cdot 18\cdot 17\cdot 16\cdot 15\cdot 14\cdot 13\cdot 12\cdot 11\cdot 10\cdot 9\cdot 8\cdot 7\cdot 6\cdot 5\cdot 4\cdot 3\cdot 2\cdot 1}{25\cdot (8\cdot 6\cdot 7\cdot 6\cdot 5)\cdot 18\cdot 16\cdot 15\cdot 14\cdot 12\cdot 9\cdot 8\cdot 7\cdot 6\cdot 5\cdot 4\cdot 2\cdot 1}$
$d_{(5,5,5,5,5)} = \frac{24\cdot 23\cdot 22\cdot 21\cdot 20\cdot 19\cdot 17\cdot 13\cdot 11\cdot 10\cdot 3}{8\cdot 6\cdot 7\cdot 6\cdot 5}$
$d_{(5,5,5,5,5)} = \frac{24\cdot 23\cdot 22\cdot 21\cdot 20\cdot 19\cdot 17\cdot 13\cdot 11\cdot 10\cdot 3}{(8\cdot \frac{6}{2})\cdot (7\cdot \frac{6}{2})\cdot (5\cdot 2\cdot 2)}$
$d_{(5,5,5,5,5)} = \frac{24\cdot 23\cdot 22\cdot 21\cdot 20\cdot 19\cdot 17\cdot 13\cdot 11\cdot 10\cdot 3}{24\cdot 21\cdot 20}$
$d_{(5,5,5,5,5)} = 23\cdot 22\cdot 19\cdot 17\cdot 13\cdot 11\cdot 10\cdot 3$
$d_{(5,5,5,5,5)} = 701149020$
Note that with $9$ students this would be:
$d_{(3,3,3)} = \frac{9\cdot 8\cdot 7\cdot 6\cdot 5\cdot 4\cdot 3\cdot 2\cdot 1}{5\cdot 4\cdot 3\cdot 4\cdot 3\cdot 2\cdot 3\cdot 2\cdot 1}$
$d_{(3,3,3)} = \frac{9\cdot 8\cdot 7\cdot 6\cdot 5\cdot 4\cdot 3\cdot 2\cdot 1}{(3\cdot 3)\cdot (4\cdot 2)\cdot 5\cdot 4\cdot 3\cdot 2\cdot 1}$
$d_{(3,3,3)} = \frac{9\cdot 8\cdot 7\cdot 6\cdot 5\cdot 4\cdot 3\cdot 2\cdot 1}{9\cdot 8\cdot 5\cdot 4\cdot 3\cdot 2\cdot 1}$
$d_{(3,3,3)} = 7\cdot 6 = 42$
In general for squares of side $n$ these are the
$n$th $n$-dimensional Catalan numbers
with an entry at OEIS A039622
...and for rectangles of sides $m,n$ the result has
an entry at OEIS A060854