Why is it so hard to recruit for compiler[-related] jobs?
Better phrased, your question is asking why it is hard to recruit for jobs that aren't currently trendy.
And the rephrasing gets at the core of the challenge - trends. In and of themselves, there isn't a whole lot wrong with trends. They'll always occur to some varying degree.
Any company or programming domain that's outside of what's currently trendy will have a bit harder of a time in recruiting candidates. It's just the nature of the beast.
But trends come and go. For example, in the late '90s and perhaps early '00s, RedHat was on a tear and "everybody who was anybody"* wanted to work there. Then the economy changed up a bit, attention focused elsewhere and the industry picked up new darlings for the popularity contest.
* Okay, that's a bit of hyperbole but that's the nature of trends
What can we do, if anything, to attract more talents, or even just interested candidates?
First off, make sure that you're promoting the interesting bits of those jobs. Every job has grunt work associated with it, and we put up with those aspects for the fun parts of our jobs. Make sure you lead with the fun parts when describing the gig.
Second, make sure you promote the fun and interesting aspects of your employer. For example, if you're recruiting in both the US and England then advertise your international presence. If you send developers overseas for periods of cross-training, point that out. Many developers are interested in opportunities to travel internationally and increase the breadth of their skills.
Third, make sure you're getting your company's name out there outside of recruiting season. Trends come and go, but you combat the trends by making sure the company's brand has at least been heard of in the off-season. There's a really large, international software firm based in Armonk that advertises constantly in order to make sure their name is known. You probably don't have the same advertising budget as they do, but you can target the campuses you're interested in recruiting from.
Fourth, always hire someone new every year especially in the lean years. It doesn't have to be the same amount as a growth year, but you need to hire at least one person. That same firm I mentioned has that type of policy in place for a host of reasons. Word will get around campus that you guys always have a slot available even in the worst of times. That security and economic strength will generate interest in your company.
Fifth, make sure that the benefits and salary your company offers are competitive. Word does get around about the quality of offers made. The students and the campus career center know who's cheap and who's competitive. Don't be cheap if you're not getting enough candidates.
Sixth, make sure that students know what skills you're looking for. They will have limited time actually developing compilers, perhaps only a semester or two of experience. If their perception is that you are looking for years of experience or only those who have done deep dives into compilers, then they're not going to apply for those jobs. Likewise, candidates may need a degree of reassurance that you'll help train them in bridging from academic compiler design to industrial compiler work.
Finally, consider donating equipment or software or both to the engineering labs. If the students don't know who your company is, then provide them the opportunity to find out about your product. Sun Microsystems did really well for a while with this approach. Giving free or low-cost gear to universities is a great way to make sure students know about your kit.