Spain’s most storied museum has been inviting writers, including Nobel laureates, to live nearby and take inspiration from its paintings.