Aperture has an obvious effect on two things: depth of field and exposure level. That means that the answer comes in two parts.
First, exposure. Here, the important thing is the amount of light hitting any given point on the sensor, not total area. See more at Do the same camera settings lead to the same exposure across different sensor sizes?, but the basic point is that for setting exposure (and see What is the relationship between ISO, aperture, and shutter speed? for more on that), f/numbers are equivalent across camera formats and sensor sizes. (This is one of the great things about the system.) ¹
Second — and I assume your main concern since you tagged the question "depth of field" and mention that directly — depth of field. Here, the rough answer is that with a number of assumptions, including printing at the same size, depth of field will be greater with the smaller sensor, by an amount roughly equivalent to that of the lens on the larger sensor stopped down by a factor the same as the ratio of sensor sizes. Whoo, that's a mouthful — basically, multiply the f/number by the crop factor between the two to get an equivalence. (Or divide, going the other way.) More detail (and more caveats) at Can a smaller sensor's "crop factor" be used to calculate the exact increase in depth of field?.
For the full-frame Nikon and Pentax medium-format, that factor is about 1.4× (if you crop the wider 3:2 Nikon frame to get an equivalent image). That means that you should have roughly equivalent depth of field at f/2.8 on the Pentax and around f/2 on the Nikon. Of course, at those apertures, for exposure to be the same, you'll need to adjust shutter speed or ISO by about a stop to match. ²
As a tangential dive: the first effect, exposure, is really only constant because when we enlarge an image from the sensor's postage-stamp actual size to view (or from film to print), we "expand" the brightness of each point, rather than dividing it across the enlarged image. Of course, more light overall hits the larger medium. More light means more signal, which means less apparent noise. Of course, differences in sensor technology also make a difference, so it's not always an easy win in the real world, but when it comes right down to it, you can't beat physics.
As Michael Clark notes in a comment, your lenses do not give an equivalent field of view. That means to get the same framing, you'll have to be a lot closer with the Pentax, which would also change depth of field (and the perspective would be different). So this whole exercise would probably be better if using a 60mm Nikkor lens alongside the 90mm Pentax.