Experimental implementation of precisely tailored light-matter interaction via inverse engineering