What does the intramolecular aldol condensation of 6-oxoheptanal form?
Intramolecular-Aldol reactions involves heat, as you have mentioned, and the base used (NaOH) isn't much affected by steric factors. Therefore, the preferred product should be thermodynamically controlled product. Moreover, as you commented about the formed carbanion being less stable in case of 2° carbon, actually the carbanion is converted to an enolate then the reaction proceeds further. So, the 5-membered cyclic ring should be the major product.