What is it? Red and waxy debris from drilling studs
It is the resin from the coniferous tree the wood was milled from. Resin, gum, amber, is in every softwood tree. It is produced by the living tree when it becomes damaged, from say boring beetles.   The pungent smell you detected while drilling was the warmed drill bit burning a pocket of tree resin. A fairly aromatic scent it is. Resin can have different consistencies depending on ambient temperature and it's age. Some resin is dried and crumbly (almost crystalline). While other times it is viscous and sticky.