Theorem: In hashing $n$ items into a hash table with $m$ locations, the expected number of collisions is $n-m+m(1 − \frac{1}{m} )^n$.
Here we have $n$ keys to hash and number of available locations is $m=n^2$. Therefore,
$E(collision) = n-n^2+n^2(1 − \frac{1}{n^2} )^n$
Maybe this can be simplified, but this is anyways the answer to this question.
To know more about this theorem and it's proof, here is the source.
Here is the link to a very similar and interesting problem discussed on math.exchange.