The electron spin resonance spectrum of the XXZ spin chain with finite length shows a double-peak structure at high temperatures around the electron paramagnetic resonance (EPR) frequency. This fact has been pointed out by direct numerical methods [S. El Shawish, 0. Cepas, and S. Miyashita, Phys. Rev. B 81, 224421 (2010); H. Ikeuchi, H. De Raedt, S. Bertaina, and S. Miyashita, ibid. 92, 214431 (2015)]. The question of whether the double-peak structure survives in the thermodynamics is of particular interest. We study the size dependence of the line shape, including the even-odd effect. It is found that the peaks forming the double-peak structure are assigned to individual resonances, each of which is specified by the magnetizations of the resonating states (M,M 1). To understand dependences, we decompose the spectrum into contributions from transitions specified by the magnetization, and we characterize the structure of the spectrum by individual contributions. We analyze the size dependence of each contribution individually by extending the moment method introduced by M. Brockman et al. to each component, and we find that the mean of each peak approaches the paramagnetic resonance point with 11 N (where N is the length of the chain), which indicates that the separation of the peaks of the double-peak structure also vanishes inversely with the system size. We also study the temperature dependence of the structure. At low temperatures, the spectrum has a single peak with a finite width at a position with a finite shift from the frequency of EPR, as pointed out by the analysis of field-theoretical works [M. Oshikawa and I. Affleck, Phys. Rev. Lett. 82, 5136 (1999)]. The study of the temperature dependence of the spectrum shows how the high-temperature spectrum changes to the low-temperature one with a drastic broadening of the spectrum.