The black tape was a nice touch on those NM cables, that works to fix a nic in the sheathing when the conductors are undamaged, but since the sheathing needs to extend 1/4" past the connector they need to come up with a fix. based on the underground feed, my guess the Siemens replaced a Zinsco because the panel was on top & that would explain the condition of the cables & that they could not raise the panel to accommodate the sheathing being shy. Cutler-Hammer used to build a underground semi-flush & a surface mount meter main that would have been a almost direct replacement, going from the worst panel made, to what used to be the best quality residential panel, after 1994 Eaton has been pushing the Zinsco II (BR) panels.
I can only see a few possible fixes, 1) J-box in the attic if accessible, but would likely trigger AFCI requirements, if more then 6' of cable was required to add the box. 2) Slip a piece of intact NM cable over each cable & use heat shrink to make sure it stays in place, there looks that originally there were enough 1/2" KO's to accommodate 2-12/2 NM cables per connector, but there is still the 1 NM & 2 SER cables to enter the box.