Several of the key issues of planar (Al,Ga)N-based deep-ultraviolet light emitting diodes could potentially be overcome by utilizing nanowire heterostructures, exhibiting high structural perfection and improved light extraction. Here, we study the spontaneous emission of GaN/(Al,Ga)N nanowire ensembles grown on Si(111) by plasma-assisted molecular beam epitaxy. The nanowires contain single GaN quantum disks embedded in long (Al,Ga)N nanowire segments essential for efficient light extraction. These quantum disks are found to exhibit intense emission at unexpectedly high energies, namely, significantly above the GaN bandgap, and almost independent of the disk thickness. An in-depth investigation of the actual structure and composition of the nanowires reveals a spontaneously formed Al gradient both along and across the nanowire, resulting in a complex core/shell structure with an Al deficient core and an Al rich shell with continuously varying Al content along the entire length of the (Al,Ga)N segment. This compositional change along the nanowire growth axis induces a polarization doping of the shell that results in a degenerate electron gas in the disk, thus screening the built-in electric fields. The high carrier density not only results in the unexpectedly high transition energies, but also in radiative lifetimes depending only weakly on temperature, leading to a comparatively high internal quantum efficiency of the GaN quantum disks up to room temperature.