We report a systematic and quantitative study of near-infrared intersubband absorption in strained AlGaN/GaN and lattice-matched AlInN/GaN superlattices grown by plasma-assisted molecular-beam epitaxy as a function of Si-doping profile with and without \ensuremath{\delta} doping. For AlGaN/GaN, we obtained good theoretical agreement with experimental measurements of transition energy, integrated absorbance and linewidth by considering many-body effects, interface roughness, and calculations of the transition lifetime that include dephasing. For the AlInN/GaN system, experimental measurements of the integrated absorbance due to the superlattice transitions produced values more than one order of magnitude lower than AlGaN/GaN heterostructures at similar doping levels. Furthermore, observed transition energies were roughly 150 meV higher than expected. The weak absorption and high transition energies measured in these structures is attributed to columnar alloy inhomogeneity in the AlInN barriers observed in high-angle annular dark-field scanning transmission electron microscopy. We simulated the effect of these inhomogeneities using three-dimensional band-structure calculations. The inhomogeneities were modeled as AlInN nanorods with radially varying In composition embedded in the barrier material of the superlattice. We show that inclusion of the nanorods leads to the depletion of the quantum wells (QWs) due to localization of charge carriers in high-In-containing regions. The higher energy of the intersubband transitions was attributed to the relatively uniform regions of the QWs surrounded by high Al (95$%$) composition barriers. The calculated transition energy assuming Al${}_{0.95}$In${}_{0.05}$N barriers was in good agreement with experimental results.