Yes, within the Marvel comics universe, comic books exist for many of the major characters. Some, like the Fantastic Four, "authorize" Marvel (the company) to do stories loosely based on their adventures (and the in-universe Captain America comics were, for a time, actually drawn by Steve Rogers), but for characters like the X-Men and Spidey, who are less in the public eye, it's largely made up.
Here's an article at CBR which gives a brief but entertaining rundown of the phenomenon.
The article does mention the X-Men in particular, with respect to a particular stunt Marvel (the real world company) did in 2000 under the banner "Marvel Comics Group", in which the real company published the comics that their in-universe counterparts published for several groups. One of these was X-Men.
Described as follows:
“X-Men” #1 by Mark Millar, Sean Phillips and Duncan Fegredo was a compelling look at the power of prejudice, as the Marvel Universe was so biased against mutants in general that this book, about a team of mutants captured by Sentinels and forced to work on a suicide mission for Colonel America, is a striking example of what those biases would look like as it crept into the popular culture of the time…