Is there a way to look through wall paintings for pencil writings?
Yes, but it's not necessarily easy to do without specialist equipment. It's done by forensic document examiners and art historians. 


  we can retrieve under-drawings below paintings by looking at them in
  infrared light. This is because the carbon used by artists to make
  their under-drawing absorbs light at that range of the spectrum ...
  Ultraviolet light has often been used to look at faint text in medieval manuscripts,


http://archimedespalimpsest.org/about/imaging/processing.php


  Spectral imaging recovers faded or erased text by capturing details
  about the ink and the parchment at different wavelengths. And because
  different wavelengths of light convey information unique to that
  spectrum, traces of iron ink, for instance, appear one way in infrared
  light, another way in ultraviolet, and, perhaps, not at all in visible
  light. Multispectral imaging collects the different information and
  recombines them into composite spectral signatures.


https://www.rit.edu/showcase/index.php?id=325


  Infrared imaging has been used to analyze old documents and works of
  art since the 1960s. But the equipment typically used by conservators
  for this kind of analysis is bulky and pricey; the systems can run
  more than $100,000. Falco has developed a hacked hand-held version
  —not as precise in resolution, but cheaper and more portable, making
  it possible to image paintings right on the walls they adorn. ...
  Falco can also jigger his camera to photograph ultraviolet light,
  which can reveal otherwise hidden details, most notably fluorescence.


http://nautil.us/blog/looking-through-paintings-to-see-whats-hidden

If it's a couple of coats of emulsion paint, and stain blocker wasn't used, you could try with a close-up infrared and ultraviolet light sources (infrared LEDs are cheap and used for CCTV, ultraviolet is used for disco lights and insect killers) and see if you can detect anything.