In this paper, we present a study of the Trapezium cluster in Orion. We analyze flux-calibrated VLT/MUSE spectra of 361 stars to simultaneously measure the spectral types, reddening, and the optical veiling due to accretion. We find that the extinction law from Cardelli et al. (1989) with a total-to-selective extinction value of $R_{rm V}=$5.5 is more suitable for this cluster. For 68% of the sample the new spectral types are consistent with literature spectral types within 2 subclasses, but as expected, we derive systematically later types than the literature by one to two subclasses for the sources with significant accretion levels. Here we present an improved Hertzsprung-Russell (H-R) diagram of the Trapezium cluster, in which the contamination by optical veiling on spectral types and stellar luminosities has been properly removed. A comparison of the locations of the stars in the H-R diagram with the non-magnetic and magnetic pre-main sequence evolutionary tracks indicates an age of 1--2~Myr. The magnetic pre-main sequence evolutionary tracks can better explain the luminosities of the low-mass stars. In the H-R diagram, the cluster exhibits a large luminosity spread ($sigma$(Log~$L_{star}/L_{odot})sim$0.3). By collecting a sample of 14 clusters/groups with different ages, we find that the luminosity spread tends to be constant ($sigma$(Log~$L_{star}/L_{odot})sim$0.2--0.25) after 2~Myr, which suggests that age spread is not the main cause of the spread. There are $sim$0.1~dex larger luminosity spreads for the younger clusters, e.g., the Trapezium cluster, than the older clusters, which can be explained by the starspots, accretion history and circumstellar disk orientations.