There is quite some controversy among contemporary Rabbis as to what constitutes hard cheese nowadays. Dose of Halacha has an extensive article discussing the various opinions and halachos:
Exactly what constitutes ‘hard cheese’ is a matter of much debate. Fatty, greasy cheese and cheese that has developed holes would both qualify as ‘hard’ (See Taz and Aruch HaShulchan YD 89:11). The Shach (YD 89:15) writes that cheese that has aged for 6 months, such as ‘swiss cheese’ (Taz 89:4) generally qualifies as hard cheese. While some measure the 6 months from the time of production, R’ Yisroel Belsky maintains that the cheese only matures while in the factory, before it is packaged. Mild cheddar is typically a couple of months old, though mature cheddar is often older than 6 months.
R’ Aharon Kotler held (Ohr Yisroel 6:p89) that only cheese which needs a sharp grater to cut up is considered ‘hard.’ Following this, R’ Moshe Heinemann classes parmesan cheese as one of the few ‘hard cheeses’. R’ Moshe Feinstein (Mishneh Halachos 16:9) and the Chazon Ish (Maaseh Ish 5:p22) likewise, held rather leniently.
The Yad Yehuda (89:26) writes that if hard cheese is used in baking, it loses its ‘hard cheese’ status when it melts. R’ Yosef Shalom Elyashiv (Kovetz Teshuvos 1:582) disagrees, however, as melting the cheese doesn’t change its taste.