It isn't a plothole. There's a rule in the Death Note that specifically covers this.
The use of the Death Note in the human world sometimes affects other human's lives or shortens their original life-span, even though their names are not actually written in the Death Note itself. In these cases, no matter the cause, the god of death sees only the original life-span and not the shortened life-span.
(Source: Volume 8 of the manga)
Short Answer: It doesn't matter how much time Misa gained from the shinigami, or how much she lost from halving her lifespan. Every time someone relevant to your fate is killed by the Death Note, the future changes and your lifespan is recalculated.
Misa was living for the sake of Light. Light was killed by the Death Note. It would have been strange if her recalculated lifespan hadn't been dramatically shorter than before.
The fact she died on Valentine's Day in the year following Light's death strongly suggests she committed suicide because he was dead. This is also shown at the end of the anime.
Longer Answer: The same way killing a murderer with the Death Note can extend the lives of their future victims, killing someone with the Death Note can shorten the lives of their loved ones.
We see both of these examples take place with Misa. Her life had ended with the mugging, but she was indirectly allowed to keep living by the Death Note. Later, she had a long life ahead of her, but the Death Note indirectly gave her a premature death.
The best part of this rule is the last sentence: "In these cases, no matter the cause, the god of death sees only the original lifespan and not the shortened lifespan."
So basically, the lifespans that shinigami see aren't reliably accurate. They can only see the person's original lifespan. If the Death Note indirectly decreases someone's lifespan, that person's visible lifespan won't change.
This rule was most likely created by the author just to help ensure there wouldn't be any plotholes.
Note: This only holds true for the Death Note indirectly shortening people's lives. The user's original lifespan will still visibly decrease if they trade half their lifespan for shinigami eyes (as shown when Rem is reunited with Misa, as she is able to tell that Misa traded half her lifespan again).
The user's lifespan will also visibly increase if the Death Note indirectly lengthens someone's lifespan. Rule LIX states:
A human death caused by the Death Note will indirectly lengthen some other human’s original length of life even without a specific intention to lengthen a particular person’s original life span in the human world.
(Source: Volume 10 of the manga)
The rule about shortened lifespans, rule XLII, is the only rule which states that "in these cases" the shinigami can't see the correct lifespan. There is never any mention of this regarding lengthened lifespans.