Hello River25, welcome. I agree with Zoe, I think you have an expat. I would vote for an American cockroach. The heads are paler and they are quite large. Lots of info on Google.
I lived in Bakersfield, CA for years, which might just be the cockroach capital of the US. I have lots of experience dealing with them.
My guess is that it came in on something you brought in from a storage area, or some such. I would think that is where the pill bug came from, too. They are harmless, by the way, they eat dead, rotting wood and leaf litter. Actually, they both do. Neither of these guys bites. Damp, dark places are where both of them go.
First thing I would do is put a stopper in the drains. Bathtub, kitchen sink, etc, I seriously doubt it flew up that high, but they are very good at using plumbing to access new territory. It doesn't have to be tight, just heavy enough that it can't be lifted by a bug. Secure all food in containers. In the pantry, cabinets. That is what they live on once they get in. And they love cardboard boxes.
I also agree with Zoe about pesticide use in general, you do not want anything to become inured to the treatment. On the other hand, if you want to sledgehammer it, there is a product called Cyper WP (Cypermethrin 40.0%) which kills everything. I do not know about availability in Spain. But it does kill cockroaches, which can be hard to knock down. We used it in Bakersfield, it is the only thing that worked.
I think you have a hitchhiker. It just happened to be in something you took into your apartment. You might just use the boric acid, and a sticky trap or two and see if there are any more. Those are pretty much inert, and non toxic. Test by waiting til midnight, go to the kitchen quietly, and turn on the light. You may have heard the phrase 'scattering like cockroaches', if there are more, that is what they will do. If you do see more, ramp up the defense.
As to whether it is male or female, Orkin Canada has this to say-
"Males have wings that extend slightly beyond the abdomen, and females may appear broader in the abdomen. Both sexes have additional jointed appendages at the tip of the abdomen called cerci. Males also possess additional appendages at the rear of the abdomen called stylets."
I think I can see stylets on yours, so it might be a male.
In any case, get onto your management person and find out if they spray the sewer lines. That is the easiest way for them to get in. The plumbing.
Good luck, and be glad you do not live in Tucson, Arizona. Those cockroaches are the size of mice. Two inches long. Seriously.