Buick Enclave, Ford Edge, Hyundai Santa Fe, Jeep Cherokee, Kia Sorento, Mitsubishi Outlander, Nissan Murano, Nissan Pathfinder, and Subaru Outback are all non-luxury smallish CUV's that come in v-6 and seem like they'd come in under $40k.
I've test driven exactly zero of these so I can't speak to leg room.