Romans 3:31 is indeed a challenge to those of us who maintain that Paul believes the formal written code of the Law of Moses has been retired. And we have a lot of evidence in our corner:
1. Romans 7 declares we no longer serve the letter of the law and have been otherwise "released" from the Law.
2. Galatians compares the Law to a tutor who we no longer need.
3. Paul (or whoever wrote Ephesians 2) directly declares the abolition of the Law of Moses, which only makes sense given Paul's otherwise pervasive arguments that the Jew-Gentile distinction - which is obviously marked out by the Law of Mose - has been dissolved.
So how to work Romans 3:31 into that picture? Not sure. But, OTOH, those who think the Law remains in force face, what seems to me anyway, to be a much more daunting exegetical task.
Its worked in by way of looking at the Foretelling of Salvation/Kingdom of God/Heaven/Christ in Jeremiah, Isaiah, and other Prophetic books as well as Hebrews that references it.
Here is one specific quote out of Jeremiah which is mirrored in multiple other passages;The Epistle of Hebrews being the telling of Jesus Christ bringing that through His Sacrifcice for Salvation of His people:
Jeremiah 31:31-34
31 Behold, the days come, saith the Lord, that I will make a new covenant with the house of Israel, and with the house of Judah:
32 Not according to the covenant that I made with their fathers in the day that I took them by the hand to bring them out of the land of Egypt; which my covenant they brake, although I was an husband unto them, saith the Lord:
33 But this shall be the covenant that I will make with the house of Israel; After those days, saith the Lord, I will put my law in their inward parts, and write it in their hearts; and will be their God, and they shall be my people.
34 And they shall teach no more every man his neighbour, and every man his brother, saying, Know the Lord: for they shall all know me, from the least of them unto the greatest of them, saith the Lord: for I will forgive their iniquity, and I will remember their sin no more.
As we can read, Jehovah takes His laws and engraves them upon the heart of those that have come to Christ Jesus and believed that Jesus is the way to God and remission and forgiveness of sin and rebellion.
As far as Romans 7, we do not serve the Law of God in sinful flesh anymore because of Jesus Christ, but serve the Law of God from the tables of the new Heart God has placed in those that are his.Romans 7 is targeting Paul's experience as a Pharasaical Jew that followed fully the ordinances of The Law, but the inward man was still bound to the sinful nature causing a battle within himself. condemning him and keeping him chained to a burdensome law that the unsaved person cannot perform from a place of truth of Spirit. He had not yet been freed by the Blood of Jesus Christ.The writing style he is using is a Historical shift in his writing to convey to the audience he is primarily speaking to going back to chapter 2. Now I know you will likely disagree with what I have just said about Romans 7 because most modern Evangelical Christians do as they are convinced that Paul is talking about His current experience as a Christian, but with that interpretation, it causes great contradiction with Chapter 6 and Chapter 8.
Yes Galatians talks of the being a tudor(or schoolmaster) but that doesnt mean that it became obsolete. The law is the shadow and a shadow is always present with the Light.
If Paul declared the abolition of Moses Law in Ephesians 2(i assume you are speaking about verses 8 and 9) then Paul is a false Prophet and contradicted not only himself but Jesus Christ and the entire OT. Thing is, He didnt do any of that. Stopping at verse 9 and not continuing is why people are led to believe the Law is done away with.
Jesus clearly stated that he did not come to abolish the law but to fulfill it. That is an entirely bigger conversation and I am going to leave it at this for now. It has to all be approached and viewed through Jesus Christ Sermon on the mount where he properly interprets the Law of God and the substance that had been perverted by Apostate Israel.