Long and short of it: The commanders associated with the task force knew they were on the ship (as reflected in the commander screen), but the ship didn't know they were aboard (didn't show up in the History/Officer/Misc tab of the Task Groups screen), so when the ship was destroyed the task force members simply entered the ether of "unknown system" because the logic didn't know to look for them as passengers and possible casualties of the action. This will be fixed in the C# version with the changes in how task forces are handled, but in the mean time one thing to do is unassign the task force members, leaving them as passengers on the ship, and then reassigning them after the battle. This will allow for casualties among the task force personnel as well as the ship's company and for them to survive the destruction of the flagship in escape pods. Otherwise, simply leave them in their unknown condition until the survivors of the flagship are rescued, then just place them on that ship as being "rescued" as well. If they aren't rescued you can retire the officers in question as they would have died along with the crew in the escape pods.
Adam.