The two products are comparable with some initial considerations. As you can see, the resolutions of the products are more or less the same:
To give a more visual comparison of the spectral bands covered by the different sensors, the handbook provides another figure:
From these information, you can guess, most of the bands are directly comparable based on their resolutions, and spectral bands, you just have to compare the correct bands (e.g. ETM+ B1 = OLI B2).
Furthermore, the two sensors record the observed data in the same units (both of them are spectrometers after all): absolute radiance.
Images are processed in units of absolute radiance using 32-bit floating point calculations.
From Landsat 8 handbook p. 61.
During 1G product rendering image pixels are converted to units of absolute radiance using 32 bit floating point calculations.
From Landsat 7 handbook.
The only difference (from this perspective) is in the quantization algorithm they use. To compress the huge amount of raw data (32bit float), the original values are quantized (16bit int), which is called digital numbers (DNs). From the DN rasters, you can compute the original values with a scale, and an offset.
The real difference between the quantizing methods, is Landsat 7 level 1 data only provide a scale, and an offset to calculate radiance values. With it, based on the Earth-Sun distance in astronomical units in the date of acquisition, and a mean solar exoatmospheric irradiance, which is a pre-calibration constant for every non-thermal band, you can calculate the reflectance value for the given scene (without correction for the solar elevation angle).
On the other hand, Landsat 8 level 1 products offer another scale and offset, with which you can easily calculate the reflectance value directly without the extra hassle. You just have to correct the value for the solar elevation angle, which is basically a division with sin(θ).
Note:
Do not be confused with the cos(θs) provided in the Landsat 7 handbook for solar elevation correction. θs is zenith angle, which is complementary with θ. Thus cos(θs) = sin(θ).
The Landsat 8 Collection 2 encompasses Level-1 (top of atmosphere reflectance) and Level-2 (atmospherically corrected surface reflectance) products. Since Landsat 8 Collection 2 level-2 correspond to surface reflectance and;
corrected for the temporally, spatially and spectrally varying
scattering and absorbing effects of atmospheric gases, aerosols, and
water vapor
it should be used to generate NDVI.
However, you need to apply scaling factor i.e., 0.0000275 + -0.2
for Level-2 before calculating NDVI. You should mask pixels which are contaminated by clouds and shadows as well.
Here, I would recommend a worth reading article "A survival guide to Landsat preprocessing" for further enlightenment.
More information about Landsat Collection 2 Level-2 Science Products can be accessed from here.
Best Answer
Because you are working with time-series data, you will want to make sure all your imagery is corrected to surface reflectance (SR). Google Earth Engine makes precomputed SR Landsat products available: https://developers.google.com/earth-engine/datasets/catalog.
You should use these precomputed SR products for your analysis.