Why didn’t Misa kill L the second time she got shinigami eyes? Why didn’t Misa kill L second time she got shinigami eyes? If she wasn't going to use them to kill him, then why did she get them, knowing her lifespan was going to be shortened? Why did Rem agree to do it?
These are actually several questions and should be asked separately (And at least one of them has already been answered). Also, please be sure to include your own research on the matter in future questions.
Why didn’t Misa kill L second time she got shinigami eyes?
The event that should have lead to her killing L was her obtaining ownership and thus regaining her memory. The only reason she made the deal a second time is that she does not remember the name and wants to see it again. However, she never meets L again and thus does not see his name.
Why did she get them then, knowing her lifespan was going to be shortened?
From a logical point of view, since Misa was saved by Gelus, she received his remaining life span and might potentially still have centuries to live even after halving her life span twice (though it is not clear how much she actually gained, given that human years and shinigami years might not work the same way and Gelus did spend quite some time watching her, assumably not killing many people).
Thought Misa is not known to be that rational. She simply wants to help/ please Light and assumes that, since she was that close to L for months, she would be able to see him again at some point. She probably planned on killing him right after meeting him the next time but that never happened.
Why did Rem do it?
Rem had stated several times, that she would do whatever it takes to protect Misa. She even agreed on killing L before the Yotsuba-arch because she did not care about Light and at that point and Light's life was the only one that would have been prolonged. Unfortunately, she never had the chance to see L before the incarceration of Misa and after comparing Light to Yotsuba-Kira, Rem grew fond of him and could no longer kill L without prolonging a human life that she wanted to protect.
After Misa regained her DN and started killing again, Rem realized that L would catch her at some point but Light would not waste the asset of Misa's Shinigami Eyes if L was dead. So the only thing Rem could do to protect Misa was to kill L and make sure that Light had all the advantages she could provide. Light prompted this reaction by talking about the possible punishment for Kira but I am sure that Rem would have come to the same conclusion anyway.