I did a similar thing, however, not identical, old job paying xyz, new job paying xyz, both identical, however my previous job was cack and the pay was terrible.
In my first interview with my current job I mentioned the salary was lower than I was looking for however I had done research into the company and it looked like a great place to work so would take the hit if, after a certain time my salary would be up for review.
18 months was their mark, it was a big bump up, 3k after being here for less than 2 years... It was a long time but it got my foot in the door. As of the end of this month, that pay rise takes effect.
So yes, you can ask, they are asking for your services, you are doing them a favour, you are getting paid to do a job. If you feel you should be paid more, then say. Worst they will say is no, take the original offer or move on.