I believe the two temperatures referred to in the Carnot Theorem are the maximum and minimum temperatures of the range of temperatures between which the engine operates.
In the case of the Carnot heat engine it operates between two fixed temperatures and not a range of temperatures. If a heat engine operates over a range of temperatures instead of fixed temperatures then the value for $T_H$ In the Carnot efficiency equation would be some mean value less than the maximum and the value of $T_L$ would be some mean value greater than the minimum. That makes the ratio $\frac{T_L}{T_H}$ larger and the efficiency less than the Carnot heat engine.
UPDATE:
This updates my answer based on our exchange of comments since my original answer.
Question 1: What does"an engine working between two temperatures"
mean? I think that this engine, during its cycle, exchanges heat only
with the heat sources (at the two temperatures) and nowhere else. And
hence, this uniquely is a Carnot cycle, if reversible. Am I correct?
I believe it means an engine that takes heat from a single temperature reservoir to produce work in an isothermal expansion process and then rejects heat to another single (lower temperature) reservoir in an isothermal compression process.
However, it is only uniquely a Carnot cycle if the isothermal processes as well as the adiabatic processes that link them, are reversible. This requires that (1) the temperature differences between the temperature reservoirs and the working fluid during the isothermal processes are infinitesimally small and (2) the pressure differences between the system and surroundings during the adiabatic processes are infinitesimally small as well and (3) no friction is involved in any of the processes.
Question 2: Does the Carnot Theorem apply only to the above-mentioned
cycles, or does it make a statement about any engine whose maximum and
minimum temperatures during one complete cycle coincide with the
isotherm temperatures of the Carnot cycle working between those
temperatures?
As I see it, the only way a reversible cycle whose maximum and minimum temperatures coincide with the isothermal temperatures of the Carnot cycle can have an efficiency less than the Carnot cycle is if the heat exchanges are occurring over a range of temperatures between the max and min, and not just two fixed temperatures. Because all reversible cycles operating between the same two fixed temperatures necessarily have the same efficiency, per the theorem.
The reversible Rankine power cycle is an example of a reversible cycle operating in a range between a maximum and minimum temperature, as opposed to operating between a single high and low temperature reservoirs. By using mean temperatures in the Carnot efficiency equation it shows how the efficiency of the reversible Ranking cycle operating between the same max and min temperatures as the Carnot cycle is less efficient. The example is worked out in the following link from the MIT.edu website: http://web.mit.edu/16.unified/www/SPRING/propulsion/notes/node65.html
The diagram below shows a reversible cycle consisting of two reversible isobaric processes and two reversible isochoric processes, shown in blue, superimposed on a Carnot cycle. The cycle operates between the max and min temperatures of the Carnot cycle, $T_1$ and $T_2$, respectively. But the reversible heat transfers occur over a series of thermal reservoirs between the max and min and not just a single high and low temperature reservoir. To determine the efficiency using the Carnot efficiency equation, one would have to use the mean values of the temperatures. This results in a lower efficiency than the Carnot efficiency.
Hope this helps.