I have seen really experienced teachers, like Fred Eckman, paint wonderful shadows from memory. I think if you observe enough real shadows, then they stick in the back of your memory and you can re-create them in your indoor paintings.
I painted this picture on the brightest sunny day we had during our workshop in France. It is the door of an old mill now turned into a wonderfully affordable bed and breakfast. If you squint at my painting you can see where I wrote the name of the B & B in my attempt at French schoolgirl cursive writing. "Moulin du Chapitre".