Since egg shell is made of calcium carbonate. And we know that when calcium carbonate \(\left(\mathrm{CaCO}_{3}\right)\) reacts with nitric acid \(\left(\mathrm{HNO}_{3}\right)\) then carbon dioxide, calcium nitrate and water are formed. So same reaction happens when nitric acid is added to an eggshell.
\(\mathrm{CaCO}_{3}+2 \mathrm{HNO}_{3} \rightarrow \mathrm{Ca}\left(\mathrm{NO}_{3}\right)_{2}+\mathrm{CO}_{2}+\mathrm{H}_{2} \mathrm{O}\)