"The judgment of which Egypt had first been warned, was to be the last visited. God is long-suffering and plenteous in mercy. He has a tender care for the beings formed in His image. If the loss of their harvests and their flocks and herds had brought Egypt to repentance, the children would not have been smitten; but the nation had stubbornly resisted the divine command, and now the final blow was about to fall. PP 273.2"
"And Pharaoh sent, and called for Moses and Aaron, and said unto them, I have sinned this time: the Lord is righteous, and I and my people are wicked."
The EGW passage describes God's long-suffering and the consequences of Egypt's continued resistance, while the Exodus verse shows Pharaoh acknowledging his sin after some plagues. The connection lies in the theme of divine judgment and the opportunity for repentance before final consequences.
Moses had been forbidden, on pain of death, to appear again in Pharaoh's presence; but a last message from God was to be delivered to the rebellious monarch, and again Moses came before him, with the terrible announcement: “Thus saith the Lord, About midnight will I go out into the midst of Egypt: and all the first-born in the land of Egypt shall die, from the first-born of Pharaoh that sitteth upon his throne, even unto the first-born of the maidservant that is behind the mill; and all the first-born of beasts. And there shall be a great cry throughout all the land of Egypt, such as there was none like it, nor shall be like it any more. But against any of the children of Israel shall not a dog move his tongue, against man or beast: that ye may know how that the Lord doth put a difference between the Egyptians and Israel. And all these thy servants shall come down unto me, and bow down themselves unto me, saying, Get thee out, and all the people that follow thee: and after that I will …
"And Moses said, Thus saith the Lord, About midnight will I go out into the midst of Egypt:"
EGW directly quotes "Thus saith the Lord, About midnight will I go out into the midst of Egypt:" from Exodus 11:4. The surrounding context in EGW's writing also closely follows the narrative in Exodus.