"culture, education, memory and experience all play a part in what is funny".
That's "spot on" [I think I learned that phrase from reading it on Mudcat]-
As to education, at first I thought you meant formal education [attendance at schools, university}, but then you gave your Mary Shelley example and I realized that you probably also meant informal learning from reading and otherwise].
My point about culture is that when we are learning about what is humorous and what is not, it's usually done informally or done in corrective mood [when we are scolded by parents, teachers or other authority figures for laughing at something that we shouldn't].