There has been some work done by Alejandro Adem and collaborators on the space of commuting tuples of elements in Lie groups, of which your $X=\mathrm{Hom}(\mathbb{Z}^2,G)$ is a special case. The paper
Adem, Alejandro; Cohen, Frederick R., Commuting elements and spaces of homomorphisms, Math. Ann. 338, No. 3, 587-626 (2007); erratum ibid. 347, No. 1, 245-248 (2010) ZBL1131.57003
contains some basic topological information about these spaces (note there is an erratum from 2010). The later paper
Adem, Alejandro; Gómez, José Manuel, On the structure of spaces of commuting elements in compact Lie groups, Björner, A. et al., Configuration spaces. Geometry, combinatorics and topology. Pisa: Edizioni della Normale (ISBN 978-88-7642-430-4/pbk; 978-88-7642-431-1/ebook). Centro di Ricerca Matematica Ennio De Giorgi (CRM) Series 14, 1-26 (2012). ZBL1277.43011
has some information about equivariant K-theory of $\mathrm{Hom}(\mathbb{Z}^2,G)$ when $G$ is compact Lie.
Browsing through these references, I wouldn't be surprised if the equivariant cohomology of $\mathrm{Hom}(\mathbb{Z}^2,G)$ is unknown for $G=\mathrm{GL}(n,\mathbb{C})$.