UV- and NIR-responsive polymeric nanomedicines for on-demand drug delivery