Enhanced light–matter interactions in dielectric nanostructures via machine-learning approach