Taking a look to the source code of the liquid-dsp project, and to the ofdmflexframegen.c file in particular, I found a partial answer to my question.
The spectral efficiency is:
$$\beta = \frac{R_b}{W}~~~~~~~~~~~~~~~~~~~~~~~~~~~(1)$$
where $R_b$ is the bit rate and $W$ is the OFDM bandwidth.
The bit rate is:
$$R_b = \frac{B}{T}~~~~~~~~~~~~~~~~~~~~~~~~~~~(2)$$
where $B$ is the data bits (of the decoded payload) and $T$ is the total transmission time.
Then, putting (2) into (1):
$$
\beta = \frac{B}{TW}~~~~~~~~~~~~~~~~~~~~~~~~~~~(3)
$$
and the product $TW = N$ is the number of samples of the transmission.
As for $N$, we have:
$$
N = (M + c)(N_{preamble} + N_{header} + N_{payload})~~~~~~~~~~~~~~~~~~~~~~~~~~~(4)
$$
where $M$ the total number of subcarriers, $c$ the length of the cyclic prefix.
$N_{preamble}$, $N_{header}$ and $N_{payload}$ are the number of OFDM symbols of the preamble, header and payload, respectively. Each OFDM symbol is comprised of $M + c$ samples.
Finally, the spectral efficiency for such a system would be:
$$
\beta = \frac{B}{(M + c)(N_{preamble} + N_{header} + N_{payload})}~~~~~~~~~~~~~~~~~~~~~~~~~~~(5)
$$
However, practical measurements of the spectral efficiency of my communication system are a little higher of what this formula predicts. It is like if the measured bandwidth was actually smaller than the predicted one. The difference increases with the payload size. I would appreciate any extra idea in this regard.
EDIT 1: Taking a deeper look to my system, it is possible that the difference between the spectral efficiency predicted by Eq. 5 and what I am measuring is due to the presence of null subcarriers. Null subcarriers at both sides of the OFDM spectrum are not measured, but they are included in Eq. 5. I wonder if I may just substract the number of null subcarrier from the term $M+c$ in Eq. 5. Does that make any sense?