Delayed-choice quantum control of light-matter interaction