High resolution absorption spectroscopy of rare earth doped insulating materials: BaY2F8 and YAl3(BO3)4 single crystals and sol-gel silica glasses