It doesn't appear right off to be sick to me- the pics are a little hard for me to see, but from what I can see he looks like his body weight is OK and does not appear dehydrated. His bones look OK as well.
Hanging out a lot with the eyes closed is not a particularly good sign. But if his temps are a bit low, he could go into a semi-brumating kind of state. Which is stupid in a pet shop, but petco and petsmart are not great when it comes to decent heat lighting setups, so it is possible.
It is also possible he could be sick or stressed or have sand in his eyes (not a fan of baby dragons on sand) or be intimidated by his cage mate- most lizards, just like chameleons, are territorial and kind of antisocial but it is more subtle in many species. In bearded dragons, some individuals will become intimidated by other individuals even though there is no outward signs of aggression- especially in groups of babies. Those at the bottom of the pecking order end up feeding less and basking less to compensate (lowering metabolism to reduce need for food intake). Petsmart especially uses tiny cages, but in any situation- even larger enclosures, this kind of thing happens- but in a 5 or 10 or 20 gallon tank where a dragon cannot get far away from the dominant animals, I could see how it might shut them out and kind of wait them out for long periods of time (days, weeks- if it goes into months it will waste away in time while being dramatically outgrown by the more dominant animal(s)).
Just a guess- but this may be the kind of dynamic going on here- the very limited basking heat in those kinds of stores and intimidation so food intake being limited some may have him shut down. The good news is they bounce back pretty quick if that is the problem- When dominant individuals are removed from the group (in this case sold off as a pet) the submissive animals re-structure their pecking order and individuals who grew slowly before take off in growth eventually. The bad news is if this is the problem- he's probably pretty stressed at the moment if he's to the point where he does not move much and keeps his eyes closed most of the time. The other bad news is it could be entirely something else- he could be early stage sick or have parasites that are making him uncomfortable or he could even have some of that sand up his vent causing irritation or infection- Honestly, I can't say without being there and picking him up, etc. But my best guess is he's cool and stressed, probably at least in part by his tank mate.
I've been breeding bearded dragons since 1994 and have produced many thousands over many generations over the years. I sort babies into sizes a few times a week, carefully measuring and removing the largest individuals from groups. The dominant animals in a group will grow as rapidly as an inch a week. When they are removed, the slower animals growth rate accelerates and new dominant animals appear from those animals. So I have to sort them constantly.
If those have been around a few weeks in the pet shop- the sub dominant animal never gets relief from the dominant.
Also eye-closing for most lizards other than chameleons is a way that they use to deal with stress. So that lines up with my guess as well. It is not unlike pre-school kids thinking if they can't see you by hiding behind their hands, then you can't see them. Lizards do it all the time, sometimes closing the eye facing the stress and leaving the other open, or closing both eyes.
Also I think that is a male lizard from what I can see of the base of the tail- male beardeds in my experience seem more prone to social stress like this when they are babies- females often out pace their male counterparts growth rate when they are raised in groups.
In an ideal world, if he can't be kept seperate from the other, the other best solution would be to fill the tank with climbing surfaces (I use lots of branches in 2x2x3' screen cages where I raise my babies) and provide plenty of basking areas (I provide 2-4 indoors per cage or keep the whole thing outdoors in sunlight during the summer) and more frequent feedings during the day to reduce competition - dominant animals will fill up at earlier feedings and leave food open for access by less dominant animals at later feedings.
When a lizard gets to where it is sitting with eyes closed- it has gone too far to be considered "normal"- normal subdominant behavior is not quite so extreme- just more limited movement, less food intake, slower growth.
Also his color does not look like he is very warm at the moment- when warmed up, subtle colors tend to brighten some and mid-range grey patterns tend to lighten some beyond what he is showing.
Just my opinion based on what you are saying and what I can see from the photos- it is completely possible he is sick and just hasn't lost weight yet either- but he isn't showing it from what I can see.