There are a lot of presuppositions in this hypothetical that don't seem realistic to expect being possible. But, for the sake of argument, the real question becomes whether or not that simulation being tortured is actually you. There's something similar in the Black Mirror episode 'Black Museum', the TNG episode 'Second Chances', and the video game Soma.
If you died centuries before the AI, you would have no continuity with the simulation (even though it may have some continuity with you). So, in effect, the you considering this thought experiment have nothing to worry about in any case. It's always going to be some technically-another-person-who-just-happens-to-have-your-memories that ends up being tortured. The people who supposedly freak the fuck out just from knowing the basilisk thought experiment exists should mega freak the fuck out about something like the http://galactanet.com/oneoff/theegg_mod.html whose logical conclusion is that a definitely-continuous-you will personally experience all the suffering that every human ever has or will endure.