Is it possible to do PhD in pure mathematics after engineering
Sure, it is "possible".  

I really question your stated rationale for it, though (couldn't get a job in engineering, thus staying in school and moving to a field that usually has harder time with job placement).  I think you would be better served beating the bushes and getting a job.