“Three can keep a secret if two are dead.”
Here’s who Aerys told about the wildfire: the three pyromancers Rossart, Garigus, and Belis. That’s it. (Jaime Lannister was the only other person in the room when this happened, and he killed the other four people involved.) The Lord Hand Chelsted “became suspicious” when he saw “Rossart, Belis, and Garigus coming and going night and day,” but when he confronted Aerys, he was immediately burned alive and couldn’t share what he knew.
So Pycelle didn’t know because Aerys kept his Small Council ignorant of his plans, because he didn’t want anyone trying to stop him.
As for why Varys didn’t know, even the best spymaster needs time to develop sources, collect information, and then correctly analyze this information. The problem is that the wildfire plot only included a few people, who maintained a high degree of operational security:
“Everything was done in the utmost secrecy by a handful of master pyromancers. They did not even trust their own acolytes to help.”
(Jaime V, ASOS)
As for why Aerys didn’t trust them on the plot but trusted them on other things, this was a fairly consistent pattern of his paranoia, where he was simultaneously afraid of the same people he was deeply dependent on, and refused to remove people who he thought was trying to kill or replace him:
“By this time, King Aerys had become aware of the widespread belief that he himself was but a hollow figurehead and Tywin Lannister the true master of the Seven Kingdoms. These sentiments greatly angered the king, and His Grace became determined to disprove them and to humble his “overmighty servant” and “put him back into his place.”
…Tywin Lannister attempted to return his chain of office the next morning, but the king refused to accept his resignation.
Aerys II could, of course, have dismissed Tywin Lannister at any time and named his own man as Hand of the King, but instead, for whatever reason, the king chose to keep his boyhood friend close by him, laboring on his behalf, even as he began to undermine him in ways both great and small.”
Aerys’ weird mind-game with Tywin lasted for a decade, and then the moment it ended, he started a new one with Jaime Lannister. As Jaime puts it, “Aerys liked to keep me close. I was my father’s son, so he did not trust me.” So it’s entirely consistent that Aerys would feel the same way about Pycelle and Varys.