Only indirectly.
The basic invention process does not take on any researched attributes of the BPOs or BPCs.
The only attribute of the BPC that affects the BPC output in the invention process is the number of runs on the copy. Generally you will either always want to use 1-run copies (mostly when inventing ships) or max-run copies (mostly when inventing modules or ammo). This comes into play when you use decryptors (or choose not to use one). These affect the invented Material Level, Productivity Level (Manufacture Time), Runs of the invented BPC, and invention chance.
However, there is still an indirect effect of ML/PL on BPOs. Usually when you make a T2 item, you have a few input products that need to be made which are consumed to make the T2, such as a T1 version of the item, and Construction Components such as Tungsten Carbide Armor Plates or EM Pulse Generator. Material levels on these BPOs mean you'll usually need to use less Moon Materials or other materials, which could lower your final cost of making the T2 item.
Putting all of these options together to figure out which is the best option to maximise profit is the interesting part of T2 manufacturing.
I think determining the ISK viability of a POS will have to come down to you having to do some rough math on your own. The price of fuel can vary from place to place and from day to day. Not to mention, the amount of fuel you will need can vary depending on the size of the POS that you decide to deploy. Then you also have the variable of how much you can actually sell your BPCs for. Some BPCs sell for more than others, but again there's a lot of variables to work in there, and it's hard to track a base price for BPCs since they sell through contracts. In the end, I think you'll have to perform the profit calculations on your own.
In regards to your second question, I can say that there's a good chance you could get wardec'd by a PVP corp/alliance if your POS looks like an easy target. My alliance has dec'd small corps in the past solely to try to crack their POS, and we have several friends who do it as well. It's less a griefer thing and more about trying to make an easy profit.
That said, there are a few things you can do to make yourself a not so easy target. For one, try to set up your POS in a less well traveled part of space. Jita and Amarr are the two largest trade hubs in the game, so you'd probably be better off not setting up shop in Domain or The Forge regions. When you do chose a system to set up shop in, chose one that's off any major travel routes. For instance, don't pick a system that's on the route between any of the four major trade hubs of Jita, Amarr, Rens, and Dodixie. You can research a potential anchor system with Dotlan. Click the Statistics link for any system to see graphs detailing jumps, player kills, NPC kills, and pod kills. The less activity on those graphs, the less busy the system is, and probably the better chance you will have of not attracting anybody's attention.
Second, how you decide to configure your POS will make a difference in how attractive it looks to a potential aggressor. There are plenty of POS configuration guides listed online, so I won't bother repeating their info here. Instead, there are just a few tips that you should know. First, spread your defense modules around. The most common layout is groupings at the top, bottom, and four along the sides. To make things even more difficult, don't place your defense modules in groups at all, but instead spread them randomly around your POS bubble. Sieging POS's set up like this is a huge PITA as your fleet is constantly on the move to hit the next module. Going heavy on the ECM can turn away potential aggressors as well. It can disrupt a logistics wing's cap chains, and it can be an annoyance for the combat ships, constantly having to relock the current primary. Also remember that artillery will still fire even if the POS has been reinforced. You shouldn't rely on it as your sole gun type, but arty can be a headache for a fleet. Lastly, take the number of defense modules you think you'll need, and triple that number. Do the same for your resists as well. And anchor all of it. You don't have to online all of it. In fact, you won't be able to. But nobody wants to siege a POS in high sec if they think they'll have to spend hours shooting down 80 POS modules as well.
Lastly, the most important thing you can do is to make friends. With the upcoming changes to wardecs you, as the aggressed party, will be able to invite friendly PVP corps into the war free of charge to them. It will be quite a nasty surprise to the aggressing corp to suddenly find themselves fighting 100 pilots instead of 1 pilot. Having good reliable friends in EVE can mean the difference between keeping your POS and losing your POS.
Best Answer
For most of the BPO you don't need any skills to research them, except Laboratory Operation for more slots. However, some more advanced BPO require you to have certain skills, as listed below:
Additionally, for T2 BPO:
I don't believe you own a T2 BPO, but in case you get your hands on one.
All those skills require different levels for different BPO, but I suggest to use EveMon to look at what level unlocks, so you will know of you gonna need it or not.
I did not take faction items into account. You CAN research them before manufacturing it, but you can only get BPC at the LP Stores anyway.