Revamped Answer. 2017-07-01
There is no contradiction because your analysis only includes what happens to the gaseous working substance in the Stirling engine, and it neglects a crucial component of the engine called the regenerator. If the regenerator is not included as a component of the engine when we perform the efficiency analysis, then we don't have a device that qualifies as a heat engine operating between two temperatures, and we therefore shouldn't expect it to abide by Carnot's Theorem as I stated in the original version of this answer.
However, if we properly take account of the regenerator, then we find that the efficiency of the engine is the Carnot efficiency.
Of course the whole analysis here is an idealized one in which we assume, for example, that there are no energy losses due to friction in the engine's components.
Details.
A stirling engine is more complex than the $P$-$V$ diagram drawn in the question statement seems to indicate. If we conceptually reduce the engine to its simplest form, it contains two fundamental components:
- A gaseous working substance. This is the part of the engine whose thermodynamic state travels along the curve in the $P$-$V$ diagram.
- A regenerator. This part of the engine absorbs and stores the energy given up by the gaseous working substance by heat transfer during the process $2\to 3$ and then returns that same energy to the gaseous working substance during the process $4\to 1$.
The crucial point is that when the regenerator is included, there is no net heat transfer into or out of the engine during the processes $2\to 3$ and $4\to 1$. The energy that leaves the gaseous working substance during the process $2\to 3$ by heat transfer is stored in the regenerator, and that heat is then given back up to the working substance during process $4\to 1$. No heat is transferred between the engine and its surroundings during these legs of the cycle.
It follows that the only heat transferred to the engine as a whole is transferred during $1\to 2$. This qualifies the device as a heat engine (see old answer below) and the efficiency of the engine is then computed as the ratio of the net work output divided by the heat input in process $1\to 2$. This yields the Carnot efficiency as it should.
My original answer claimed that the cycle drawn does not represent the operation of a heat engine operating between two temperatures, but I was neglecting the regenerator, and I believe this is what you implicitly did in the computation you originally performed as well, and this yielded the incorrect efficiency.
Original, incomplete answer.
There is no contradiction. The Stirling cycle you drew above is reversible but does not operate between two reservoirs at fixed temperatures $T_1$ and $T_2$. The isovolumetric parts of the cycle operate at continuously changing temperatures (think ideal gas law).
Old Addendum. Note that in thermodynamics, a heat engine is said to operate (or work) between (two reservoirs at) temperatures $T_1$ and $T_2$ provided all of the heat it absorbs or gives up is done so at one of those two temperatures.
To give credence to this definition (which is essentially implicit in most discussions of heat engines I have seen), here is a quote from Fermi's thermodynamics text:
In the preceding section we described a reversible cyclic engine, the Carnot engine, which performs an amount of work $L$ during each of its cycles by absorbing a quantity of heat $Q_2$ from a source at temperature $t_2$ and surrendering a quantity of heat $Q_1$ to a source at the lower temperature $t_1$. We shall say that such an engine works between the temperatures $t_1$ and $t_2$.