The consequence might be that Snape regrets his words deeply. He could spend a lot of time trying to make amends to Lily in the fanfiction. This could involve him trying to prove that he doesn't really believe in the idea of 'Mudblood' and that it was just a momentary slip - up due to his anger or the influence of his Slytherin peers.
In fanfiction, one possible consequence could be a complete breakdown of their friendship. Lily might cut all ties with Snape immediately. This event could also lead to Snape's further isolation at Hogwarts as Lily was one of the few people who had some sort of positive connection with him. Moreover, it could fuel Snape's inner turmoil and his journey towards either redemption or further descent into the dark arts, depending on how the author of the fanfiction chooses to develop his character.
It makes Snape seem more of a complex and flawed character. In the original series, Snape has his own prejudices, and in fanfiction when he calls Hermione a Mudblood, it exaggerates that aspect of him. It shows his darker side that is still influenced by the pure - blood ideology.
It deteriorates rapidly. Lily is likely to be extremely hurt and angry. She probably won't be able to forgive Snape easily, if at all. Their relationship which might have had some complexity and depth before, turns into one of animosity from Lily's side.
One reason could be jealousy. Maybe Snape gets jealous of Lily's other relationships or her popularity at Hogwarts. Another could be a fundamental difference in their beliefs or values that grows over time into hatred.
It could be that in fanfiction, Snape has been through some additional trauma or experiences that change his perception of Lily. For instance, if he discovers something about Lily that he doesn't like, such as her involvement in some secret or her having a different side to her character that he finds unappealing. This would cause him to dislike her, as opposed to his more nuanced feelings in the original story.
One reason could be jealousy. If in the fanfiction Snape is getting more attention or praise from the wizarding world than Lily, she might start to dislike him. Another reason could be that Snape has a different view on blood purity, and Lily strongly disagrees with him, which leads to her hatred.
One possible theme is unrequited love. Snape loved Lily deeply, and their Patronuses, both being doves perhaps in some fanfictions, could symbolize that love. His Patronus could be a constant reminder of his love for her, even though she was with someone else.
It could also be due to some external factors. Maybe there are threats from dark forces that he doesn't want to involve Lily in. If he is getting deeper into the dark arts or some dangerous situations, he might choose to give up on her to protect her from the potential harm that could come her way because of his associations.
One possible theme is loyalty. Snape's loyalty to Lily was unwavering, and fanfictions can explore how that loyalty manifested in different situations, like when he had to choose between the Death Eaters and protecting Lily. Another theme could be regret, as Snape may have regretted some of his actions that affected his relationship with Lily.
Socially, it could be difficult for him. If others find out that he still has feelings for Lily and she's pregnant, he could face ridicule or be the subject of gossip. Also, depending on his relationship with Lily's partner, there could be conflict. He may have to face the fact that he has to keep his distance more than ever to avoid causing trouble for Lily and her unborn child.
One possible plotline could be that Lily is forced into betraying Snape due to some dark magic influence on her. Maybe she's under a spell that makes her give away Snape's secrets to his enemies. Another could be that she betrays him out of jealousy. Suppose Snape gets closer to someone else, and Lily, in a fit of envy, does something that seriously harms Snape. It could also be that Lily is misled by false information about Snape being involved in some really bad deeds, and without proper investigation, she believes it and betrays him.