Can you roll your attack dice, then decide after you have seen the result if you want to roll an extra die (and lose a shield)?
When does Miranda's Ability Trigger?
You decide before you roll as its worded you may spend one shield to roll one additional attack die etc
You choose before you roll any dice. But you can make the choice on either of your two TLT attacks - so you can roll the first as normal, then based on how it did, decide whether to boost or regen on the second.
Specifically, You must use Miranda (and Jan Ors pilot, Opportunist) ability in step 2, Roll Attack dice. (Rules reference: attack).
This means you CAN use it on the 2nd attack of Cluster missiles or TLT.
Can you roll your attack dice, then decide after you have seen the result if you want to roll an extra die (and lose a shield)?
No. Rules Reference, p. 5:
All additions or subtractions to the number of attack dice being rolled occur before the player rolls the attack dice.
...
All additions or subtractions to the number of defense dice being rolled occur before the player rolls the defense dice.
All effects that change how many attack or defense dice get rolled must be used before rolling.