Peter quotes from Exodus according to it's context. He's not changing it's meaning.
He's showing the real meaning. If you read about God's promises to Abraham and his seed in the OT and didn't have the NT to refer to, do you think you would conclude that the promises applied to Jesus and those who belong to Him, as Paul said in Galatians 3:16-29? I doubt it. So, did Paul change the meaning or give the true meaning of those promises?
Consider to whom his letter is addressed.
1 Peter 1:1 YLT
Peter, an apostle of Jesus Christ, to the choice sojourners of the dispersion of Pontus, Galatia, Cappadocia, Asia, and Bithynia,
I assume you think it was addressed only to Jews? But, where is that indicated? It's not indicated specifically.
But, for the sake of argument, let's say he was specifically writing only to Jewish Christians there.
He calls them a "spiritual house" which has Jesus Christ as its cornerstone (1 Peter 2:5-7). Is that not the church (see Eph 2:19-22)? Is there any other "spiritual house" with Jesus Christ as its cornerstone besides the church? I don't believe so.
So, even if he was only referring to Jewish believers there, he was not addressing them in terms of their status of being physical descendants of Israel, but rather in terms of their spiritual status in the church. So, him calling them a "holy nation" must have a spiritual or heavenly connotation, not an earthly one, since that fits the context of what he was saying, overall.
So, to summarize, my main point is that he was addressing them it terms of being part of the church and not in terms of what earthly nation they descended from.
But, coming back to who Peter was addressing there, consider this.
1 Peter 4:3 For you have spent enough time in the past doing what pagans choose to do—living in debauchery, lust, drunkenness, orgies, carousing and detestable idolatry.
Is this something he would have said to those who were formerly religious Jews who became Christians? I don't believe so. Their problem before was being too religious and not having a personal relationship with God. Their problem wasn't really "living in debauchery, lust, drunkenness, orgies, carousing and detestable idolatry". That's more typical of how Gentiles had lived before becoming Christians. They were not religious and had no morals at all (Paul said they were formerly "without God in the world" - Eph 2:12), whereas the religious Jews at least had morals even if they were off base in thinking they could save themselves by obeying the law rather than by grace through faith.