Surface interactions and topological restrictions in liquids confined in nanopores. II. Light response in polymeric systems